• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 13. ESSENTIAL LINGO SYNTAX > TROUBLESHOOTING LINGO SYNTAX

TROUBLESHOOTING LINGO SYNTAX

  • Any time you place something inside quotes, it represents a string. So, "4+2" is just 4+2, whereas 4+2 is 6.

  • Remember that rounding works two different ways in Lingo. If you perform an operation on integers, such as 3/4, the fractional remainder is dropped, giving you a 3/4 = 0. However, if you use the integer function, the result is rounded. So, integer(.75) = 1.

  • A function that does not use a return command at the end, or instead uses an exit command to leave the handler, returns a value of VOID, which is interpreted by Lingo to be equal to FALSE. You can test for VOID with the voidP() function.

  • If you use getProp to get the property value in a property list, and for some reason the property does not exist, you get an error message. This halts the program for users. However, if you use getAProp instead of getProp, you will get a VOID value rather than an error message. You can test for this and handle it in your code.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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