Jeśli chcesz wziąć udział w dyskusjach na forum - zaloguj się. Jeżeli nie masz loginu - poproś o członkostwo.
Vanilla 1.1.4 jest produktem Lussumo. Więcej informacji: Dokumentacja, Forum.
while lim==-1>0 do ... od
while(--lim>0) { ... }
lim==-1
while lim>0 do
...
lim==-1
od
card func dec(card pointer x)
x^==-1
return (x^)
proc glowna_procedura()
card i
card pointer j
j=@i
i=11 ;wartosc poczatkowa
while dec(j)>0 do ;tu nasza petla
printce(i)
od
return
proc glowna_procedura()
card i=[11] ;wartosc poczatkowa
card pointer j
j=@i
while dec(j)>0 do ;tu nasza petla
printce(i)
od
return
Tdc:
Odnośnie wskaźnika, to najprostszym oraz najszybszym rozwiązaniem jest zmienna globalna;)PROC LINKA(BYTE X0,Y0,X1,Y1)
PLOT(X0,Y0)
DRAWTO(X1,Y1)
RETURN
MODULE;***
BYTE I
PROC DEMO()
FOR i=0 to 79
DO
LINKA(0,0,159,I)
OD
RETURN
MODULE;***
BYTE KLAVESA
PROC HLPROGRAM()
GRAPHICS(7)
COLOR=1
DEMO()
PRINTE("STLAC")
KLAVESA=GETD(7)
RETURN
Gury:
I will stick with Free Pascal, because it's powerful and portable to many platforms and architectures.PROC picture()
CARD time
INT x,y,r,i
INT xp,yp
Ingon()
Poke(19,0) Poke(20,0)
Graphics(24)
Setcolor(2,0,0)
Color=1
Plot(10,85)
FOR r=-85 to 0 step 4 do
for i=0 to 360 step 10 do
xp=10000/(r-65)
yp=10000/(r+96)
x=160+Sin(i-r)/xp
y=96+Sin(i*2+r)/yp
If x>=0 AND x<=319 and y>=0 AND y<=191 then DrawTo(x,y)
FI
OD
OD
time=peek(19)*256+peek(20)
Graphics(0)
PrintF("/E/ETest Time: /B tacts/E",time)
RETURN
w1k:
An unhandled exception occured at $00417F82:.var i .
test1.asm (8) ERROR: Bad parameter type .
mva b_param1 X0
test.asm (14) ERROR: Undeclared label B_PARAM1 (BANK=0)
mva b_param2 Y0
test.asm (15) ERROR: Undeclared label B_PARAM2 (BANK=0)
mva b_param3 X1
test.asm (16) ERROR: Undeclared label B_PARAM3 (BANK=0)
mva b_param4 Y1
test.asm (17) ERROR: Undeclared label B_PARAM4 (BANK=0)
mva #0 b_param1
test.asm (27) ERROR: Undeclared label B_PARAM1 (BANK=0)
mva #0 b_param2
test.asm (28) ERROR: Undeclared label B_PARAM2 (BANK=0)
mva #159 b_param3
test.asm (29) ERROR: Undeclared label B_PARAM3 (BANK=0)
mva I b_param4
test.asm (30) ERROR: Undeclared label B_PARAM4 (BANK=0)
MVA B_PARAM1 LINKA.X0
test.asm (31) ERROR: Undeclared label B_PARAM1 (BANK=0)
MVA B_PARAM2 LINKA.Y0
test.asm (31) ERROR: Undeclared label B_PARAM2 (BANK=0)
MVA B_PARAM3 LINKA.X1
test.asm (31) ERROR: Undeclared label B_PARAM3 (BANK=0)
MVA B_PARAM4 LINKA.Y1
test.asm (31) ERROR: Undeclared label B_PARAM4 (BANK=0)
mwa Store1 KLAVESA
test.asm (47) ERROR: Undeclared label STORE1 (BANK=0)
Gury:
just overwrite the path for equates.asm to the directory where you installed the program + \libproc start()
byte i
for i = 1 to 10
do
printbe(i)
od
return
BYTE ARRAY euro(13)
PROC Main()
n1=30.1260
n2=euro*n1
Put(125)
Setcolor(2,3,2)
PrintE("*** EUROKALKULACKA ***")
PrintE("Z Basicu previedol W1K, 09.2009")
PrintE("Slovak Eurocalculator - From Basic to Action - W1K, 09.2009")
PutE()
PrintE("Zadaj sumu v eurach")
InputS(euro)
Print(n2)
RETURN
BYTE ARRAY euro(10),suma(10)
PROC Main()
n1=30.1260
euro=suma*n1
Put(125)
Setcolor(2,3,2)
PrintE("*** SLOVAK EUROCALCULATOR 0.2 ***")
PutE()
PrintE("Enter the amount in EURO")
InputS(euro)
Print(suma)
RETURN