OSDN Git Service

SourceForge.JP で Mac 旧来の改行コード( CR のみ)の場合に正常に処理されないので、改行コードを変更。
[bacon/BaCon-Japanese.git] / 関数・命令 / RECORD.txt
1   RECORD
2
3   【1.0 build 10 追加】
4    RECORD <var>
5        LOCAL <member1> TYPE <type>
6        LOCAL <member2> TYPE <type>
7        ....
8    END RECORD
9
10    Type: statement
11
12    Defines a record <var> with members. If the record is defined in the
13    mainprogram, it automatically will be globally visible. If the record is
14    defined within a function, the record will have a local scope, meaning
15    that it is only visible within that function. To declare a global record
16    in a function, use the DECLARE or GLOBAL keyword.
17
18    The members of a record should be defined using the LOCAL statement and
19    can be accessed with the 'var.member' notation. Also refer to WITH for
20    assigning values to multiple members at the same time. Example:
21
22    RECORD var
23        LOCAL x
24        LOCAL y
25    END RECORD
26    var.x = 10
27    var.y = 20
28    PRINT var.x + var.y
29