.comment-link {margin-left:.6em;}

Monday, December 17, 2007

 

bcx basic manual (beta)

I am not realy sure there is much interest in such things and it is possible there is a manual somewhere that I should use instead... this is just a couple of pages that I have started, maybe I will do more looks like there is a pretty good example of what I have been wanting to do. There does not appear to be a complete manual anywhere..

example s00 hello world type example
example s01 goto label example
example s02 if then else example
example s03 simple example of a function
example s04 creating and storeing 1000 strings
example s05 chr$
example s06 looks like an example to get the command line
example s07 do loop example
example s08 print example
example s09 looks like an example to load a file (need to double check that skip for now)
example s10 create a test file (I skipped this for now)
example s11 a hello world example
example s12 true false example using if..then
example s13 an example using input
example s14 example of instr (I need to look this up and add it below"
example s15 left$
example s16 for..next loop

cls ... : clear screen
dim ... variable : intializes a variable
color ... color, unknown : text color
input ... text or number, string : prints out string or vaiable and then puts user input in a string
Len ... string$ : length of string ex. len($a)
locate ... x,y, unknown : goto spot on text screen
print ... string : prints text to screen can also use ? instead of print

PROGRAM CONTROL

if ... then ... else ... end if
example
if a% > b! then
function = a%
else
function = b!
end if

for ... next
example
for k = 0 to 14
color k
next

While ... Wend
example
while len(a$[counter%]) < 79
a$[counter% = a$[counter%] & *)
Wend

goto ... label:
example
goto here
a$ = "test" 'this command gets skipped
here:

do ... loop
example
do
a++
if a>45 then
exit loop
end if
? a
loop

Function .. End Function

a$ = there$("hello")
Function There$ (C$)
Function = Ucase(C$) & " There "
End Function

STRINGS

right$(string$,number)

example

a$ = right$(a$,5) 'takes the five left most charecters

left$ 'this is the same concept as right$

chr$

example

a$ = chr$(65) + chr$(66) 'adds the ascii char in the postion to end of the string

command$

example

a$ = "The Command Line =" & Command$

types of variables
$ .. string variable ex a$
% .. numeric example a%
! .. numeric example a!
# .. numeric pounds I think example a#

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?