Sunday, August 4, 2024

🚧 Data Types Overhaul in The Works

Planned for the next version of BAM and currently in the development version of BAM:

BYTE and UBYTE

  • Changing the "BYTE" data type from unsigned byte values to signed byte values (range -128 to 127)
  • Adding the "UBYTE" data type for unsigned byte values (range 0 to 255)




INTEGER, SHORT and USHORT

  • Adding the "USHORT" data type for unsigned short integer values (range 0 to 65,535)
  • The "SHORT" data type (aka "INTEGER" for compatibility with GW-BASIC) for signed short integer values (range -32,768 to 32,767) already existed and remains unchanged



LONG and ULONG

  • Adding the "ULONG" data type for unsigned long integer values (range 0 to 4,294,967,295)
  • The "LONG" data type for signed long integer values (range -2,147,483,648 to 2,147,483,647) already existed and remains unchanged










Saturday, August 3, 2024

πŸ“š Function Study: CINT, FIX, INT

 

NOTE:  In the current version of BAM, CINT(-1.5) gives a value of -1, which is inconsistent with the result from GW-BASIC (-2).  The image below comes from the development version of BAM.  The related update to CINT will be released in the as-yet-unscheduled next version of BAM.









πŸ–₯ Code Challenge: Snacky Friends, a Donkey, and Apples

This program is my submission for a code challenge by "sVB" (as per this Facebook post shared with the "BASIC Programming Language" group):

Once upon a time, 3 friends bought apples and carried them on a donkey.
When night came, they decided to sleep in the forest.

The first friend woke up hungry at midnight, so he divided the apples into three equal shares.
The one extra remaining apple, he gave it to the donkey.  He then ate his share and went back to sleep.

A while later, the second friend woke up hungry, so he divided the remaining apples into three equal shares.
The one extra remaining apple, he gave it to the donkey.  He then ate his share and went back to sleep.

A while later, the third friend woke up hungry, so he divided the remaining apples into three equal shares.
The one extra remaining apple, he gave it to the donkey.  He then ate his share and went back to sleep.

In the morning, the 3 friends woke up hungry, so they divided the remaining apples into three equal shares.
The one extra remaining apple, they gave it to the donkey.  They then ate each of their share.

How many apples did they initially buy, and how many apples did each of them eat?

Thursday, August 1, 2024

πŸ’‘Preview Work-in-Progress Documentation Updates

If you want to see documentation updates in the works, you can always take a look at, in the development version of the BAM Programming Reference and User Guide, the Recent Updates to This Documentation page.

To might find it useful to compare the development version of the documentation with the current production (i.e. released) version of the documentation found here.

Monday, July 29, 2024

πŸ“š DIM Syntax Diagram

This is a complex diagram.  To condense it a little bit, some details have been moved into smaller detail diagrams further below.


(Click on the image to enlarge)

(Click on the image to enlarge)



Saturday, July 27, 2024

πŸ–₯ Circular Sinusoidal Waves with DRAW and SIN

Run the program View the source code