• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

DID YOU KNOW?

  • You can set the default number of decimal places that Lingo is to use in floating point values with the floatPrecision system property. It starts with a value of 4.

  • Using a function called chars is another way to extract a piece of a string. If you try chars("abcdefdgh",3,5), you get the value "cde". Because chunk expressions cannot be used if you plan to export to a Java applet, chars is the only option for extracting characters from strings or fields.

  • If you use an if statement on a single line, Director expects there to be an else statement on the very next line. If there isn't, or if there is a blank line, Director assumes that there is no else statement to match the if statement. However, it is very easy to accidentally nest a one-line if statement inside another if statement that has an else. In that case, Director assumes that the else goes with the second if, not the first. This example shows how to fix this problem with a blank line:

    if a = 1 then
      if b = 1 then c = 1
      -- need comment or blank line here
    else
      c = 2
    end if
    
  • You can include more than one possible value as a condition of a case statement by simply placing a list of values before the colon separated by commas.

  • Rectangles can be a series of four numbers, such as “rect(10,20,50,60)” or a series of two points, such as “rect(point(10,20),point(50,60))”.

  • You can also use the function list to create a list. So, list (4, 7, 8) is the same as [4, 7. 8].


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint