spiega2
disegnare 9
riquadri e inserire testi indicati:selezionare Edit-Card e
scrivere programma cfr.sotto:salvato il programma
si attiva cliccando su singoli tasti:inserire su richiesta numeri
per avere risultati
--PROGRAMMI ASSEGNATI A TASTI INDICATI CARD1
--TASTO1 on mouseDOWN PUT 0 into somma repeat for 3 times ask "scrivi numero" put it+somma into somma end repeat put "somma " & somma into cd fld 1 end mousedown
--TASTO2 on mouseDOWN PUT 0 into somma repeat with a=1 to 3 ask "scrivi numero" put it+somma into somma end repeat put "somma numeri con WITH =" & somma INTO CD FLD 2 end mousedown
--TASTO3 on mouseDOWN PUT 0 into somma put 99 into massimo put massimo into it repeat until it>massimo ask "scrivi numero:per finire 100" IF it <100 then put it+somma into somma end repeat put "somma numeri con UNTIL =" & somma into cd fld 3 end mousedown
--TASTO4 on mouseDOWN PUT 0 into somma put 0 into it put -99 into minimo put -50 into limite repeat while it>minimo ask "scrivi numero:-200 per finire" if it>minimo then put it+somma into somma if it>limite then exit repeat end repeat put "somma con WHILE..EXIT " & somma into cd fld 4 end mousedown
--TASTO PROSSIMA on mousedown go to next cd end mousedown
altro esempio di programma e suo listato
--PROGRAMMI ASSEGNATI AI TASTI INDICATI --RIPORTATI SU CARD2 MEDIANTE EDIT-COPY-PASTE --TASTO1 on mousedown put 5 into a put 8 into b if a=b then put "valori uguali " into cd fld 1 else put "valori diversi " into cd fld 1 end if end mousedown
--TASTO2 on mousedown put 5 into a put 8 into b if a<b then put "a < b " into cd fld 2 if a>b then put "a > b " into cd fld 2 end mousedown
--TASTO3 on mousedown put 5 into a put 8 into b if a<b then put "a < b " into cd fld 3 put "fine prova If " into cd fld 4 end mousedown
--TASTO4 on mousedown put mouse() if true then put "positivo" into cd fld 5 if false then put "negativo" into cd fld 5 end mousedown
--TASTO5 on mousedown put mouse() if true then put "positivo" into cd fld 6 else put "negativo" into cd fld 6 end if end mousedown
--TASTO6 on mousedown put 0 into somma repeat with a=5 down to 1 put somma+a into somma end repeat put "ciclo D= " & somma into cd fld 7 end mousedown
--TASTO7 on mousedown put 0 into somma repeat with a=1 to 5 put somma+a into somma end repeat put "ciclo A= " & somma into cd fld 8 end mousedown
--TASTO USCITA on mousedown close wd end mousedown