Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 04:54 18 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : PEEK problem

Author Message
panky

Guru

Joined: 02/10/2012
Location: Australia
Posts: 1116
Posted: 05:24pm 30 Nov 2016
Copy link to clipboard 
Print this post

Geoff,

It appears that the function PEEK(VARADDR var()) creates a zero length array which can not be erased, reDIM'd or have any data entered into it - see code below:-


> new
> clear
> dim a$(5)
> a$(0)="A"
> a$(4)="B"
> erase a$
> dim a$(8)
> a$(0)="T"
> a$(7)="P"
> erase a$
> a$(0)="H"
Error: A not declared
> ' all as you would expect
> new
> clear
> a$(0)="K"
Error: A not declared
> ' as you would expect
> print hex$(peek(varaddr a$()))
A001DEF8
> a$(0)="Y"
Error: Index out of bounds
> erase a$
Error: Cannot find A
> dim a$(4)
Error: Index out of bounds
>


Unsure if this classifies as a bug or just a limitation to take note of. For your info.
Doug.


... almost all of the Maximites, the MicromMites, the MM Extremes, the ArmMites, the PicoMite and loving it!
 
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9643
Posted: 06:21pm 30 Nov 2016
Copy link to clipboard 
Print this post

Nice find.
Looks like it might be a bug.
Smoke makes things work. When the smoke gets out, it stops!
 
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3303
Posted: 09:07pm 30 Nov 2016
Copy link to clipboard 
Print this post

Good one, thanks.
Geoff Graham - http://geoffg.net
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025