Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
(11-21-2019, 04:28 PM)boriel Wrote:
(11-21-2019, 01:03 PM)maeloterkim Wrote:
(11-10-2019, 10:02 PM)boriel Wrote: This has been implemented in ZX Basic 1.9+

Hi Smile 

What is the sintaxis for DIM at?

Can you put some examples with initialized array and not initialized array?


DIM AT does not allow initialized values. The content will be whatever there exists already at the given location.

For arrays the syntax is

DIM varname(dim1, dim2, dim3...) AS <type> AT <address>. For example:

DIM a(6144) As UByte AT 16384

This is undocumented (yet) for arrays, but will be updated here:

Hope this helps

Well i'm doing now this for the UDGs

DIM MyUDGs(167) As uByte => {MY...UDG...BYTES}
poke uinteger 23675, @MyUDGs

would be very good do something like this  Wink   

[font=Tahoma, Verdana, Arial, sans-serif][font=Tahoma, Verdana, Arial, sans-serif]DIM MyUDGs(167) As uByte  AT (PEEK[font=Tahoma, Verdana, Arial, sans-serif] uinteger 23675)  [/font][/font]
[/font][font=Tahoma, Verdana, Arial, sans-serif]=> {MY...UDG...BYTES} 


[font=Tahoma, Verdana, Arial, sans-serif][font=Tahoma, Verdana, Arial, sans-serif]DIM MyUDGs(167) As uByte  [/font][/font]
[font=Tahoma, Verdana, Arial, sans-serif][font=Tahoma, Verdana, Arial, sans-serif]=> {MY...UDG...BYTES}  [font=Tahoma, Verdana, Arial, sans-serif]AT (PEEK[font=Tahoma, Verdana, Arial, sans-serif] uinteger[/font][font=Tahoma, Verdana, Arial, sans-serif] 23675)[/font]

where the UDGs are poked directly where they must be

maybe you can "know" where the programmer want to put the values of the array ( calculate all the memory used and the memory left )

then you know what memory is left to put the compiled program 

and then you know if is compilable or not

i don't know if i'm saying somethig stupid or is a posible idea  Tongue

Hope this helps

Messages In This Thread

Forum Jump:

Users browsing this thread: 1 Guest(s)