[futurebasic] Re: [FB] How to declare (dim) and init an array at once

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2001 : Group Archive : Group : All Groups

From: Heather Donahue <heatherd@...>
Date: Mon, 29 Oct 2001 06:27:03 -0800
At 4:33 PM +0900 on 10/29/01, Osamu Shigematsu wrote:


>Hello, all.
>
>I wonder if how can I declare and init an array at once.
>In FB2, I used following code.
>
>
>GOTO "MAIN"
>"MyDataPtr"
>` DC.W 1,2,3,4,5,6,7,8
>
>"MAIN"
>XREF myArray%(8)
>myArray& = LINE "MyDataPtr"
>
>In C, we can do this simply:
>
>short myArray[8] = {1,2,3,4,5,6,7,8};
>
>Is there any cool way in FB^3?

I'm pretty sure there isn't a really easy way.  I asked about this 
many months ago and I think the best response I got was loading the 
array from a resource file.  I can't recall the exact method but it 
wasn't hard.

I also wish that FB supported the C syntax.  I know that the C syntax 
is supported in Visual Basic and likely RealBasic.

I really wish it now that I'm looking at some Blowfish encryption 
code.  One array is filled by over 1000 unsigned long hex numbers.

Looking at it I have to wonder if just taking the code and making a 
shared library out of it would be simpler.
-- 
Heather Donahue
--
non sum qualis eram