MMBasic for Windows - betas

Author Message


Joined: 16/09/2019
Location: United Kingdom
Posts: 3782
Posted: 04:25pm 03 Mar 2022      

  Mixtel90 said  Good point - RESTORE n only restores to the line, not the actual data. I messed up there. Fine if you have an equal number of items on every line and you read a full line though. Why would comments make a difference?

Because it would change the line numbers and mess up any carefully setup pointers from your original example.

  Quote  Peter does have a point though, CSUB was never intended to be used for data storage and using them as such is a first class kludge - even if it does work. :)

I agree, let's have:
   01234567 89ABCDE

Though due to MMBasic limitations BINARY and CSUB would probably end up having to share a command token so basically you're back to using the CSUB mechanism with some syntactic sugar.

My real issue is that we had something with all the power required and so far we're looking at replacing it with something less capable.

  Quote  I suppose fixed-length data can be POKED into strings or even longsstrings.

It's not where to store the data in memory that is the problem, it's where to read the data you want to store in memory from, or to put it another way how to initialise the memory storage.

  Quote  (Waiting for Tom to store data in BMP files...  :) )

If I wanted to use files I could just use binary files, they wouldn't have to be bitmaps. Also locating files relative to a .INC file is problematic since once a program is running MMBasic doesn't know anything about the arrangement of the .INC files that made up any given program.

But it does pose the question without the CSUB mechanism how do you put bitmaps into programs on 'mites that don't have an SD card reader ?

Best wishes,

Edited 2022-03-04 02:26 by thwill