FCAP BASIC Pogram Example

------------------------------*------------------------------

REM ** EXAM_11.PRO **

Rem Test of internal functions

Pi=3.141593

print:print "------"

x=12
x$=Str$(x):y$=Str$ x
print "x,x$=Str$(x),y$=Str$ x: ";x,x$,y$
x$=Str$(x+34)
rem y$=Str$ x+34
print "x,x$=Str$(x+34)";x,x$
x$=Str$(134):y$=Str$ 234
print "x$=Str$(134),y$=Str$ 234: ",x$,y$
print "------"

x=12
x$=Str$(x):y$=Str$ x
print "x,x$=Str$(x),y$=Str$ x: ";x,"'";x$;"','";y$;"'"
x$=Str$(x+34)
rem y$=Str$ x+34
print "x,x$=Str$(x+34)";x,x$
x$=Str$(134):y$=Str$ 234
print "x$=Str$(134),y$=Str$ 234: ","'";x$;"','";y$;"'"
print "Len(x$),Len(y$):",Len(x$),Len(y$)
day=12:year=1995
x$=str$(day)+"th June, "+Str$(year)
print:print x$
print "------"

x=-12
y=sgn(x):z=sgn x
print "x,y=sgn(x):z=sgn x: ";x,y,z
y=sgn(x+21):z=sgn x+8
print "x,y=sgn(x+21):z=sgn x+8: ";x,y,z
y=sgn(-1):z=sgn -1
print "y=sign(-1):z=sign -1: ";y,z
y=sgn(3):z=sgn 3
print "y=sgn(3):z=sgn 3: ";y,z
y=sgn(0):z=sgn 0
print "y=sgn(0):z=sgn 0: ";y,z
print "------"

x$="Lymphocytes"
x=Len(x$):y=Len x$
print "x=Len(x$):y=Len x$: ";x$,x,y
x=Len("CD4+ subpopulation"):y=Len "CD4+ subpopulation"
print "x=Len('CD4+ subpopulation'):y=Len 'CD4+ subpopulation': ";x$,x,y
print "------"

x$="-93.45":y$="a+13.45"
x=val(x$):y=val x$
print "x$,x=val(x$):y=val x$: ",x$,x,y
x=val(y$):y=val y$
print "y$,x=val(y$):y=val y$: ",y$,x,y
x=val("123.45"):y=val "223.45"
print "x=val('123.45'):y=val '223.45' ",x,y
x=val("a+523.45"):y=val "a+623.45"
print "x=val('a+523.45'):y=val 'a+623.45' ",x,y
alpha=20
x=val("alpha+523.45"):y=val "alpha+623.45"
print "alpha,x=val('alpha+523.45'):y=val 'alpha+623.45' ",alpha,x,y
x=val("33.45+a"):y=val "43.45+a"
print "x=val('33.45+a'):y=val '43.45+a' ",x,y
x=val(x$+"53.45")
rem y=val x$+"23.45"
print "x$,x=val(x$+'53.45'): ",x$,x
x=val("63.45"+x$)
rem y=val "73.45"+x$
print "x$,x=val('63.45'+x$): ",X$,x
c$="Good Morning"
x=val(c$+"253.45"):y=val("363.45"+c$)
print "c$,x=val(c$+'253.45'),y=val('363.45,+c$) ",c$,x,y
x=val("Good"+"253.45"):y=val("363.45"+"Good")
print "x=val('Good'+'253.45'),y=val('363.45,+'Good') ",x,y
print "------"

x$="Lymphocyte subpopulation"
y$=Mid$("Lymphocyte subpopulation",6,10)
print "y$=Mid$('Lymphocyte subpopulation',6,10): ",y$
y$=Mid$(X$,6,10)
print "y$=Mid$(x$,6,10): ",y$
x=6:y=10
y$=Mid$("Lymphocyte subpopulation",x,y)
print "y$=Mid$('Lymphocyte subpopulation',x,y): ",x,y,y$
y$=Mid$(X$,x,y)
print "y$=Mid$(x$,x,y): ",x,y,y$
x$="Lymphocyte ":z$="subpopulation"
y$=Mid$("Lymphocyte "+z$,x,y)
print "y$=Mid$('Lymphocyte '+z$,x,y): ",x,y,y$
y$=Mid$(X$+z$,x,y)
print "y$=Mid$(x$+z$,x,y): ",x,y,y$
print "------"

x=77
x$=Chr$(77):y$=Chr$ 77
print "x$=Chr$(77),y$=Chr$ 77 :";x$,y$
x$=Chr$(x):y$=Chr$ x
print "x$=Chr$(x),y$=Chr$ x :";x,x$,y$
print "------"

x=Pi/4
y=tan(x):z=tan x
print "x,y=tan(x),z=tan x:";x,y,z
y=tan((2*x+3)/2-1.5)
print "x,y=tan((2*x+3)/2-1.5):";x,y
print "------"

x=4
y=sqrt(x):z=sqrt x
print "x,y=sqrt(x),z=sqrt x:";x,y,z
y=sqrt((2*x+3)/2-1.5)
print "x,y=sqrt((2*x+3)/2-1.5):";x,y
x=sqr(13)
y=sqrt(x):z=sqrt x
print "x=sqr(13),y=sqrt(x),z=sqrt x:";x,y,z
y=sqrt((2*x+3)/2-1.5)
print "x,y=sqrt((2*x+3)/2-1.5):";x,y
print "------"

x=2
y=sqr(x):z=sqr x
print "x,y=sqr(x),z=sqr x:";x,y,z
y=sqr((2*x+3)/2-1.5)
print "x,y=sqr((2*x+3)/2-1.5):";x,y
x=sqrt(3)
y=sgr(x):z=sqr x
print "x=sqrt(3),y=sqr(x),z=sqr x:";x,y,z
y=sqr((2*x+3)/2-1.5)
print "x,y=sqr((2*x+3)/2-1.5):";x,y
print "------"

x=Pi/6
y=sin(x):z=sin x
print "x,y=sin(x),z=sin x:";x,y,z
y=sin((2*x+3)/2-1.5)
print "x,y=sin((2*x+3)/2-1.5):";x,y
print "------"

x=Pi/3
y=cos(x):z=cos x
print "x,y=cos(x),z=cos x:";x,y,z
y=cos((2*x+3)/2-1.5)
print "x,y=cos((2*x+3)/2-1.5):";x,y
print "------"

x=1
y=arctan(x):z=arctan x
print "x,y=arctan(x),z=arctan x:";x,y,z
y=arctan((2*x+3)/2-1.5)
print "x,y=arctan((2*x+3)/2-1.5):";x,y
print "------"

h$="8 hours"
y=Asc("Monocytes"):z=Asc "Monocytes"
print "y=Asc('M..') z=Asc 'M..': Monocytes",y,z
y=Asc(h$):z=Asc h$
print "h$='8 hours',y=Asc(h$) z=Asc h$: ";h$,y,z
print "------"

x=-22
y=abs(x):z=abs x
print "x,y=abs(x),z=abs x:";x,y,z
y=abs(2*x+3):z=abs 2*x+3
print "x,y=abs(2*x+3),z=abs 2*x+3:";x,y,z,"z hibas"
print "------"

x=2.2
y=exp(x):z=exp x
print "x,y=exp(x), z=exp x: ";x,y,z
y=exp(2*x+1):z=exp 2*x+1
print "x,y=exp(2*x+1), z=exp 2*x+1: ";x,y,z
x=log(12)
y=exp(x):z=exp x
print "x=log(12),y=exp(x), z=exp x: ";x,y,z
y=exp(2*x+1):z=exp 2*x+1
print "x,y=exp(2*x+1), z=exp 2*x+1: ";x,y,z
print "------"

x=25
y=log(x):z=log x
print "x,y=log(x), z=log x: ";x,y,z
y=log(2*x+1):z=log 2*x+1
print "x,y=log(2*x+1), z=log 2*x+1: ";x,y,z
x=exp(3)
y=log(x):z=log x
print "x=exp(3),y=log(x), z=log x: ";x,y,z
y=log(2*x+1):z=log 2*x+1
print "x,y=log(2*x+1), z=log 2*x+1: ";x,y,z
print "------"
Print "End of printing"




Click here to Download FCAP BASIC Examples

Click here to Copy FCAP BASIC Examples from this CD-ROM

[------------------------------*------------------------------]

[SF Home Image]Soft Flow home page | List of Examples | Library of FCAP BASIC Applications


Last update on Friday, September 27, 1996