| |
|
|
| variables go automatically declared. you're pub and typen-dynamic.
The Wertetyp of/ one variables corresponds to always the values-Type the last Zuweisung.
i=1// now i type long
i="Hallo"// now i type string
i=1.1// now i type float
it can also in a Slip complex Structures definiert go:
myvar=[ "woods1"=[ "apples"=20 "pears"=30 ] "town"=[ "autos"=20 "moves"=[
] ] the same with OOP-spelling:
Opportunities with numerischen Schlüsseln:
however:
b=5
print a.b//corresponds to not a.5 separate a["b"]
//
print a[b]//corresponds to a[5]
Stringkonstanten can with " as well as - what right useful is - with ' umschlossen definiert go.
for Arrays simply in eckiger Klammer kommagetrennte values: [10,20,30,...]
becomes on a Stringvariable like a aray zugegriffen by eckicke clinging so can on each single characters zurückgegriffen go as would the String one CharArray:
a="test"
print a[2]//gives s from
//too possibly:
print "test"[2]// gives s from
Info: Assoziative Arrays with OOP-spelling benefit:
Datentyp of/ one variables detect:
Related: § 5 - Datentypen |
|
|
| |
|
|
|
Michael W. | get String then Untertypen? Ansistring, Widestring16, Utf-8
such a thing ähnliches runs Yes with FreePascal... whom Stringtyp uses Android because at all. |
|
|
| XProfan X3System: Windows 8/10, XProfan X4 Programmieren, das spannendste Detektivspiel der Welt. | 12/02/14 ▲ |
|
|
|
|
| i'll everything possible to UTF8 report.
Android nativ uses imho too "nur" ansi, The Apps against can sonstwelche Zeichensätze use. |
|
|
| |
|
|
|
| Stringkonstanten spelling
Nachtrag: Stringkonstanten cannot only with "And ' umschlossen definiert go separate too by acutely ´ ( [...] ) .
the has so many advantages.
in example can The string(n)
Max's Burger -> "Max's Burger", Max "Jonas" Mustermann -> 'Max "Jonas" Mustermann', Max's Burger "Jonas" Mustermann -> ´Max's Burger "Jonas" Mustermann´
define. |
|
|
| |
|
|
|
| Arrays spelling
Nachtrag: have long hither and thither consider (haha, grüble quasi already since years dran), which The simplest but of my opinion to too sinnvollste Arrayschreibweise his could z.B. even if one Arrays as Parameter transfer would like but without a variable To deklarieren.
or plainer: How should one var looks for a aray the same values get. now have I a imho very tidy Solution:
on the example the function Input can it well explain.
momentarily Parameter: cover, default, ButtonsBeschriftungenAlsArray.
And so GEHTS: CompileMarkSeparationinput "Titel","VorgabeText",["Button1-Text","Button2-Text",...]
//oder
var meinArray=[10,20,30]re> I find' the "perfekt". simply only The eckigen clinging without Bingbong and Klimperdideldu.
@Roland: Perhaps. can You too for XProfan X3 these spelling translate? I stops the simply for best. the Schlüsselwort aray is so superfluously. |
|
|
| |
|
|
|
| Nachtrag:
2 new Types: zero and Bool
are hinzugekommen To: Long, Float, String, Array and Proc
where the type zero too always the value zero has, not 0!
in example can The date- and Zeitfunktionen zero back supplying z.B. with ungültigen Operationen but too 0 as valid worth. |
|
|
| |
|
|
|
| The individual values of Arrays can unterschiedlichen Type his:
var a=[10,20,"Hallo",10.5,["Test",50,zero,60,[true,false,msgbox],true,100],false,200] |
|
|
| |
|
|
|
| Stringspecial: becomes on a Stringvariable like a aray zugegriffen by eckicke clinging so can on each single characters zurückgegriffen go as would the String one CharArray:
var a="test" print a[2] //gives s from
too possibly:
print "test"[2] // gives s from |
|
|
| |
|
|
|
| an Variable must not very so hot as an Proc or one of Functions bereitgestelltes Schlüsselwort. |
|
|
| |
|
|