Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 17:51 09 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 : DIM array help....

Author Message
Grogster

Admin Group

Joined: 31/12/2012
Location: New Zealand
Posts: 9592
Posted: 04:31am 10 Feb 2020
Copy link to clipboard 
Print this post

I'm a bit stuck trying to work out how to use and access an array.

I have FOUR sets of FIVE integers I want to keep track of.
An array would be perfect for that.
Reading the manual(pages 56, 57), defining it would seem to be a case of: DIM Q(5,4)

This should give me an array of four sets of five integers.

Writing and reading is now where I am lost.

With a simple one-dimensional array such as DIM Q(5), reading and writing to the elements is easy: X=Q(3) as a reading example, or Q(3)=X as a writing example.

However, how do you do the syntax for a bigger one?

IE: How do I go about writing to the 5th element on the 4th set of elements for example?

EDIT: Nevermind....  





Playing about on the console has revealed how to do it!
Another fantastic use for the console - just type in commands and see what happens.
Edited 2020-02-10 14:40 by Grogster
Smoke makes things work. When the smoke gets out, it stops!
 
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