sharp pc-1350
the rom basic supports; strings, multi-dimension arrays, graphics, peek & poke (it has a proper memory map, 16bit), printing, save & load to cassette tape, print using (remember that?), gosub, beep and more math functions (eg asn = arc sine) than you normally get with basic (its a calculator too!) sharp basic does not have a dynamic pool for string variables. this leads to a slightly unusual aspect of the implementation is the way character string work and the namespace for variables. variables A-Z are pre-allocated and can be either numeric or strings, but if strings, they can contain only 7 characters (the memory of 1 number). other variables have to be created with DIM. by default, string variables are 16 characters. new variables take 2 character names like AA, AA$ or A1$ etc. however you can dimension the existing names into new variables. eg DIM A$(10), reserve 11, 16 characters strings into A$. arrays created with DIM can be one or two dimensional. furthermore, if they are string arrays, the length of the strings can also be specified (16 is the default) as illustrated by this example, DIM A1$(5)*26. this reserves 6 strings of 26 characters into A1$. therefore, rather oddly, to make a single string longer than 16 chars would be something like; DIM A$(0)*80. 80 character strings is max and array dimensions is limited by 255. the string length specification can also be used to make strings shorter than the default in order to save memory, calculated as 7+(array dimension+1)*length bytes. the DEF key can be used to attach programs to letters and to store text abbreviations. so normally, you might have several programs in memory and attach them to letters for quick run-mode execution.
|