Download Lingo Dictionary
Transcript
abbr, abbrev, abbreviated These elements are used by the date and time functions. See also date() (system clock) abort Syntax abort Description Command; tells Lingo to exit the current handler and any handler that called it without executing any of the remaining statements in the handler. This differs from the exit keyword, which returns to the handler from which the current handler was called. The abort command does not quit Director. Example This statement instructs Lingo to exit the handler and any handler that called it when the amount of free memory is less than 50K: if the freeBytes < 50*1024 then abort See also exit, halt, quit abs() Syntax abs (numericExpression) Description Math function; calculates the absolute value of a numerical expression. If numericExpression is an integer, its absolute value is also an integer. If numericExpression is a floating-point number, its absolute value is also a floating-point number. The abs function has several uses. It can simplify the tracking of mouse and sprite movement by converting coordinate differences (which can be either positive or negative numbers) into distances (which are always positive numbers). The abs function is also useful for handling mathematical functions, such as sqrt and log. Example This statement determines whether the absolute value of the difference between the current mouse position and the value of the variable startV is greater than 30 (since you wouldn’t want to use a negative number for distance). If it is, the foreground color of sprite 6 is changed. if (the mouseV - startV).abs > 30 then sprite(6).forecolor = 95 56 Chapter 3