Jump to content
Random Terrain

What does dim stand for in batari Basic? How about Designate Interchangeable Moniker?

Recommended Posts

Take a look at this page:

 

stackoverflow.com/questions/1033507/what-does-dim-stand-for-in-visual-basic-and-basic/3860269

 

One person posted "DIM originally (in BASIC) stood for dimension, as it was used to define the dimensions of an array."

 

We don't use dim for arrays in bB, so we need something other than dimension.

 

Another person posted "In my opinion, "Declare In Memory" is actually a mnemonic, created to make it easier to learn how to use DIM. I see "Declare in Memory" as a better meaning as it describes what it does in current versions of the language . . ."

 

The problem with "Declare In Memory" or "Declaration In Memory" is that it could make people think it uses up memory in bB.

 

I went through an online thesaurus and found three words that seem to fit:

 

Define Interchangeable Moniker

 

Is it OK if I use that or does someone have a better idea?

 

 

Update (2020y_06m_05d_0954t)

 

After batari's post below, how about this instead:

 

Designate Interchangeable Moniker

  • Like 2

Share this post


Link to post
Share on other sites

Interesting discussion topic RT!

 

I always thought DIM stood for dimension.

 

It seems like you do declare it directly in memory though instead of loading it, the way bB combines it -

 

I think bB combines the dim command with the data statement like:

 

 data myarray 1,2,3,4,5

 

 

This is an advantage over dim myarray(5) and loading the values from a data statement because it is preloaded, but it is an array of constants that cannot be changed.

 

Atari Flashback BASIC arrays are static like bB but SuperCharger BASIC arrays are variables like classic BASIC.

 

Are there enhancements for using variable arrays in DPC+ bB?

 

I have only used the classic edition, but I read about the stack being added which sounds kind of like a single array.

 

Interesting fact - tiny BASIC initially had only one array and the 26 a-z variables.

 

Share this post


Link to post
Share on other sites

In batari Basic, dim is only used to make variable aliases.

Share this post


Link to post
Share on other sites

I used dim here because it had been the standard for variable aliasing for a long time. I recall using it even back in the 80s like this. It was always for compiled BASICs, not interpreted BASICs, so maybe that is the distinction?

 

I'd be careful with the acronym though as there is also a def command, which does a similar thing (at a high level, anyway), though I did see the reports that it wasn't reliable. I am not saying to change the acronym, but to make sure that this isn't confused with def.

 

Under the hood, dim and def operate differently: dim tells the assembler that two variables are equal to each other, and they are compiled to the same address.

 

def is just a basic string replacement in the preprocessor level, before compilation takes place (I think it's the preprocessor, but I don't quite remember?) and the compiler sees only the replaced string. I also saw the comment about def being limited to 50, but I am pretty sure that is a hard-coded limitation that could easily be increased in the source code for bB.

  • Like 3

Share this post


Link to post
Share on other sites
11 hours ago, batari said:

I used dim here because it had been the standard for variable aliasing for a long time. I recall using it even back in the 80s like this. It was always for compiled BASICs, not interpreted BASICs, so maybe that is the distinction?

 

I'd be careful with the acronym though as there is also a def command, which does a similar thing (at a high level, anyway), though I did see the reports that it wasn't reliable. I am not saying to change the acronym, but to make sure that this isn't confused with def.

 

Under the hood, dim and def operate differently: dim tells the assembler that two variables are equal to each other, and they are compiled to the same address.

 

def is just a basic string replacement in the preprocessor level, before compilation takes place (I think it's the preprocessor, but I don't quite remember?) and the compiler sees only the replaced string. I also saw the comment about def being limited to 50, but I am pretty sure that is a hard-coded limitation that could easily be increased in the source code for bB.

 

Thanks. I'll see if I can find a D word that doesn't start with def. How about this:

 

Designate Interchangeable Moniker

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...