Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 21:55 01 Jul 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 : Memory reservation

Author Message
drkl

Senior Member

Joined: 18/10/2015
Location: Hungary
Posts: 102
Posted: 10:34am 08 Apr 2016
Copy link to clipboard 
Print this post

Hello,
Here is a code:

option explicit
option default NONE

'DIM A(1000) AS INTEGER 'MEMORY RESERVATION 1000*8 BYTE -OK
'DIM A(1000) AS FLOAT 'MEMORY RESERVATION 1000*4 BYTE - OK
'DIM A(100) AS STRING 'MEMORY RESERVATION 100*256 BYTE - OK
DIM A(100) AS STRING LENGTH 10 'MEMORY RESERVATION 100*256 BYTE - WHY???


After run:


>RUN
> MEMORY
Flash:
1K ( 1%) Program (3 lines)
59K (99%) Free

RAM:
25K (47%) 1 Variable
0K ( 0%) General
28K (53%) Free

There are somebody who can explain it?

drkl


 
drkl

Senior Member

Joined: 18/10/2015
Location: Hungary
Posts: 102
Posted: 10:58am 08 Apr 2016
Copy link to clipboard 
Print this post

Sorry, I found the solution
Must use an other definition:


DIM string a(1000) LENGTH 10 'MEMORY RESERVATION 1000*11 BYTE - OK


drkl
 
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