
|
INFO - FAQ - CC2-Forum - CCPro-Forum |
|
||
|
Hallo miteinander > Das gleiche in BASIC++ > > if i < 10 then > print "i ist kleiner 10" > else > print "i ist groesser 10" > end if ..und hier OCBASIC. Und in CCBASIC plus Parser sieht es auch nicht großartig anders aus: dim i byte if i < 10 then print "i ist kleiner 10" else print "i ist groesser 10" end if > und das ganze in BASIC++ > > i = funktion1(1) > end > > function funktion1(a as byte) > return (a + funktion2()) > end function > > function funktion2() > funktion2 = 5 ' kann man auch alternativ als RETUN nehmen > end function ..und hier OCBASIC. Das "FUNCTION"-Keyword existiert zumindest bisher nicht. i = funktion1(1) end ' function funktion1(a as byte) #funktion1 pop a 'Alternativ: a=pop return (a + funktion2) 'Alternativ: return pop+funktion2 ' function funktion2() #funktion2 return 5 Dietmar Meine Homepage: http://ccintern.dharlos.de |
| Antwort schreiben |