OSDN Git Service

GitHub で公開していた内容を SourceForge.JP へ複製
[bacon/BaCon-Japanese.git] / 関数・命令 / LOCAL.txt
1   LOCAL\r\r   LOCAL <var>[,<var2>][,<var3>][,...] [TYPE <c-type>] [ARRAY <size>]\r\r   Type: statement\r\r   This statement only has sense within functions, subroutines or records.\r   It defines a local variable <var> with C type <type> which will not be\r   visible for other functions, subroutines or records, nor for the main\r   program.\r\r   If the TYPE keyword is omitted then variables are assumed to be of\r   'long' type. If TYPE is omitted and the variablename ends with a '$'\r   then the variable will be a string.\r\r   The ARRAY keyword is used to define a dynamic array, which can be\r   resized with REDIM at a later stage in the program.\r\r   Example:\r\r   LOCAL tt TYPE int\r   LOCAL q$\r   LOCAL new_array TYPE float ARRAY 100\r   LOCAL name$ ARRAY 25\r\r   Multiple variables of the same type can be declared at once, using a\r   comma separated list. In case of pointer variables the asterisk should\r   be attached to the variable name:\r\r   LOCAL x, y, z TYPE int\r   LOCAL *s, *t TYPE long\r\r