esercitazioni con Turbo Basic
esci turboba.htm
sintassi varia, numeri, stringhe, vettori
rem sole7
rem uso di funzione e LOCAL SHARED cfr.TBAS5
cls
h$="----------------------------------------------------------"
A=8:B=9
PRINT "variabili a,b=";A,B
print FNY1(A),"prodotto 8*H "
print FNY2(B),"prodotto 9*H "
print "variabili globali a,b ";A,B
print "variabile locale h ";H
print h$
print FNY3(A),"prodotto 8*K "
print FNY4(B),"prodotto 9*K "
print "variabili globali a,b,k ";A,B,K
print h$
end
DEF FNY1(X)
LOCAL H
H=5
FNY1=X*H
END DEF
DEF FNY2(X)
FNY2=X*H
END DEF
DEF FNY3(x)
SHARED K
K=6
FNY3=X*K
END DEF
DEF FNY4(X)
FNY4=X*K
END DEF