Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 11:25 19 Feb 2026 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 : How about this for a Christmas surprise?

     Page 4 of 4    
Author Message
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 604
Posted: 10:10pm 26 Dec 2025
Copy link to clipboard 
Print this post

Fantastic    
 
PeteCotton

Guru

Joined: 13/08/2020
Location: Canada
Posts: 604
Posted: 12:00am 27 Dec 2025
Copy link to clipboard 
Print this post

Having just read through it all - WOW!

It's an incredibly comprehensive implementation of structures.

This is really going to clean up my code massively (reliant on a CMM2 version of course )

Thank you once again!
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 546
Posted: 11:43am 27 Dec 2025
Copy link to clipboard 
Print this post

  matherp said  I think if you do the maths, struct save is saving the dimm'd variable rather than a specific row of the array. So points has 4x2x8 bytes = 64 bytes and in file fpoints.bin you are saving 4 times = 256 bytes. Looks like a bug. Points(1) should save just the one line and points() should save the full array. This is precisely why user testing is so valuable. The test script didn't test this variant. Thanks


Would it be possible to add an optional record length parameter to the OPEN like this:
OPEN fname$ FOR RANDOM AS #1 [,LEN=50]

with a default length of 1 so that
SEEK #1,n

would get the nth 50-byte record rather than have to calculate the position each time through? If you want to duplicate the current capability, just omit the record length parameter. Then SEEK would act just as it does now. No existing program would have to be changed.
Edited 2025-12-27 21:51 by toml_12953
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10965
Posted: 12:56pm 27 Dec 2025
Copy link to clipboard 
Print this post

AFAIK no version of Basic has this. And all you have to do is a multiply so the answer is no.
 
richship
Newbie

Joined: 08/05/2025
Location: United States
Posts: 4
Posted: 03:27pm 27 Dec 2025
Copy link to clipboard 
Print this post

Very cool and useful! Specifying max string lengths is a nice bonus.

Now that dot syntax is creeping in, there could be subs and functions inside the type definition that operate with the context of an instance of the type...
Edited 2025-12-28 01:28 by richship
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 546
Posted: 03:29pm 27 Dec 2025
Copy link to clipboard 
Print this post

  matherp said  AFAIK no version of Basic has this. And all you have to do is a multiply so the answer is no.


Microsoft BASIC (MBASIC, BASIC-80, BASICA) has it. So does TRS-80 Level II BASIC.
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10965
Posted: 04:16pm 27 Dec 2025
Copy link to clipboard 
Print this post

Still not going to happen, umpteen lines of C to code and test just to save 1 line of Basic
 
toml_12953
Guru

Joined: 13/02/2015
Location: United States
Posts: 546
Posted: 05:49pm 27 Dec 2025
Copy link to clipboard 
Print this post

  matherp said  Still not going to happen, umpteen lines of C to code and test just to save 1 line of Basic


Fair enough. It's still a fantastic product!
 
     Page 4 of 4    
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 2026