IonicWind Software

IWBasic => General Questions => Topic started by: Rock Ridge Farm (Larry) on May 11, 2024, 06:54:23 PM

Title: Question about DEF and DIM
Post by: Rock Ridge Farm (Larry) on May 11, 2024, 06:54:23 PM
While working on the new compiler I discovered that DIM and DEF produce
the same output. Example DIM x:int and Def x:int.
Any ideas????
Title: Re: Question about DEF and DIM
Post by: billhsln on May 11, 2024, 11:05:56 PM
Older compatibility.  DIM was EBA, DEF is IWB, if I remember right.

Bill
Title: Re: Question about DEF and DIM
Post by: Brian on May 12, 2024, 06:32:32 AM
From the EBA help file:

Array dimensions must be a constant or resolve to a constant. For dynamic arrays see the NEW statement. A colon ':' may be used as a shortcut to the AS keyword. DIM is a synonym for DEF and the two can be used interchangeably.

Brian
Title: Re: Question about DEF and DIM
Post by: Rock Ridge Farm (Larry) on May 13, 2024, 04:32:39 PM
OK - that is solved - now for the next: Does anyone use byte packing
in structures ie: TYPE abc,1
I can find little to no value to it in the new compiler - it produces
llvm .ll output.

Actually had a couple of very good days. Hands are working.

Larry
Title: Re: Question about DEF and DIM
Post by: Brian on May 14, 2024, 03:24:52 AM
I've never actually used it myself, but would use it if I picked up an example using it. Seems to be in the Sapero or PT domain!

Although I think the option should be there to include a packing value, if needed

Brian
Title: Re: Question about DEF and DIM
Post by: Egil on May 14, 2024, 05:44:11 AM
Quote from: Rock Ridge Farm (Larry) on May 13, 2024, 04:32:39 PMActually had a couple of very good days. Hands are working.

Larry


Nice to see that you are up and going Larry, almost can't wait to see the finished product.
Never used TYPE myself yet, but I agree with Brian it would be nice to have the possibility to use it.

Good Luck1

Egil
Title: Re: Question about DEF and DIM
Post by: Rock Ridge Farm (Larry) on May 14, 2024, 07:01:15 AM
I found it in std.inc

Larry
Title: Re: Question about DEF and DIM
Post by: billhsln on May 15, 2024, 09:23:59 AM
I know I haven't used the 'Type abc,1'.  Of course, I also don't know why it might be required.

Bill