[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Using dim for arrays
[Thread Prev] | [Thread Next]
- Subject: Re: Using dim for arrays
- From: Brian G <brian@xxxxxxxxxxxxxxxx>
- Date: Mon, 25 Aug 2025 13:29:39 -0700
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On 8/25/25 08:27, Brian G wrote:
I am thinking this may need a rewrite, as the before anything else no longer applies, what is the correct way to declare a static array?Why is Public a[7000] as integer Private a[7000] as integer private a as new integer[7000] all work but in a function/sub only dim a as new integer[7000] works when help system says that dim a[7000] as integer is supposed to be valid but in fact returns the error embedded arrays are invalid here Help system says: DIMThis keyword is used for declaring local variables. All DIM declarations must be in theFUNCTION <https://gambaswiki.org/wiki/lang/function>orSUB <https://gambaswiki.org/wiki/lang/sub>before the first executable command.Examples *DIM* fTimeDiff2 *AS* *Float* *DIM* iTest *AS* *Integer* *DIM* iK*[*9*]* *AS* *Integer* ' ik[0] to ik[8] *DIM* shX*[*3*,*3*]* *AS* *Short* *DIM* date1 *AS* *Date* iTest *=* 8 See also * Local Variable Declaration <https://gambaswiki.org/wiki/lang/localdecl> * Naming Conventions <https://gambaswiki.org/wiki/doc/naming>
-- ~~~~ Brian
Attachment:
OpenPGP_0x78BFB26402F48419.asc
Description: OpenPGP public key
Attachment:
OpenPGP_signature.asc
Description: OpenPGP digital signature
Re: Using dim for arrays | Brian G <brian@xxxxxxxxxxxxxxxx> |
Using dim for arrays | Brian G <brian@xxxxxxxxxxxxxxxx> |