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.
PeteCotton Guru Joined: 13/08/2020 Location: CanadaPosts: 604
Posted: 10:10pm 26 Dec 2025
Copy link to clipboard
Print this post
Fantastic
PeteCotton Guru Joined: 13/08/2020 Location: CanadaPosts: 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 StatesPosts: 546
Posted: 11:43am 27 Dec 2025
Copy link to clipboard
Print this post
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 KingdomPosts: 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 StatesPosts: 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 StatesPosts: 546
Posted: 03:29pm 27 Dec 2025
Copy link to clipboard
Print this post
Microsoft BASIC (MBASIC, BASIC-80, BASICA) has it. So does TRS-80 Level II BASIC.
matherp Guru Joined: 11/12/2012 Location: United KingdomPosts: 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 StatesPosts: 546