| |
|
|
HofK | particularly efficient are oftmals polymorphe Procedures. the functions with Infinity-Profan integrally simply.
yesterday on the 24.02. wrote I yet: _________________________________________________________ If then sometime another Sonderzeichen for var( ) How °a remain ought to would it superzumquadrat! _________________________________________________________
and today already could I var(a) through °a supplant!
// polymorphe procedure
print poly 8 3 print poly "only these Zeichenkette watts transfer!" print poly "Text with number" 7 print poly "Text with number" 2.71 print poly "Text-number-Wahrheitswert " 1998 true print poly 2 4 2.8 // no gültige Parameterliste for poly
proc poly a b c // check type or. which Parameter present if °a=="long" && °b=="long" && c==null return "long-long-zero-> the Result a-2*b is: " + (a-2*b) elseif °a=="string" && b==null && c==null return a elseif °a=="string" && (°b=="long" || °b=="float") && c==null if °b=="long" return "Übergabe: 1. Parameter Zeichenkette, 2. Parameter whole number" endif if °b=="float" return "Übergabe: 1. Param. is Zeichenkette, 2. Parameter Dezimalzahl" endif elseif °a=="string" && (°b=="long" || °b=="float") && °c=="bool" return "Parameter Passing: 1. Zeichenkette, 2. number, 3. Wahrheitswert" else return "sure incorrect Parameter indicated ??? " endif endproc
_____ Seinerzeit was too The question, whether one instead of var(a)=="long" only var(a)==long To write make possible could. |
|
|
| |
|
|