Xojo - Grundlagen #01 - für Einsteiger
|
Code
|
Erklärung
|
Var name as string |
Variable als String definieren
|
Var name as integer |
Variable als Zahl definieren
Ganzzahlige Werte verwenden 4 Byte für 32-Bit-Apps und 8 Byte für 64-Bit-Apps Ganzzahlwerte reichen von -2.147.483.648 bis 2.147.483.647 (32-Bit-Apps) oder -9.223.372.036.854.775.808 bis +9.223.372.036.854.775.807 (64-Bit-Apps) |
Var name as double |
Variable als Gleitkommazahl definieren
|
Var name as boolean = true |
Variable als boolescher Wert
true oder false |
Var c As Color = Color.RGB(124, 124, 163) |
Variable als Farbwert
im RGB Format |
Var blueColor As Color = Color.Blue |
Variable als Farbwert in Color Konstante
|
Var greenColor As Color = &c00ff00 |
Variable als Farbwert in HEX Format
|
|
Code
|
Erklärung
|
Var name as String |
Variable als String definieren
|
Var answer as String="XYZ" |
Variable direkt definieren und füllen
|
answer = name + " is a " + occupation + "." |
Verkettung durch + und Variable Name
|
Var title as String="cheMIST" |
Uppercase wandelt String in Großbuchstaben
Title = CHEMIST |
Var title as String="cheMIST" |
Titlecase wandelt String nur erster Großbuchstaben
Title = Chemist |
Var title as String="cheMIST" |
Lowercase wandelt String nur in Kleinbuchstaben
Title = chemist |
No comments yet.
Cheatography n. The art of mapping complex subjects into clear, instantly navigable reference guides.