Stage 100-108: Character datatype removed (for now)

Follow the development of the SharpBASIC compiler and share your thoughts and ideas.
User avatar
Site Admin
Posts: 40
Joined: Sun Nov 21, 2021 12:04 pm
Location: Netherlands

Stage 100-108: Character datatype removed (for now)

Post by frank »

Due to lack of time I have not been able to work on the compiler for some time, but I intend to continue as planned.

In this stage, the character datatype has been (temporarily) removed because of too much complexity in conjunction with the string datatype. Since SharpBASIC has fixed length strings, this shouldn't be much of a miss.

A bug has been removed with string concatenation.

A random number generator function (rnd) has been added. Unlike other BASIC languages, it generates a dword integer, or with argument an unsigned integer between 0 and max:

Code: Select all

incl "lib/";

dim n: int;
dim m: uint;

main do

  ' random integer
  n = rnd();

  ' random unsigned integer 1-9
  m = rnd(8)+1;

Last edited by frank on Mon Jun 19, 2023 1:03 pm, edited 2 times in total.
Keep it simple!