Gem+
Un nuovo linguaggio di programmazione
Esempi
Documentazione
▶ Run
Editor
1
Output
Cancella output
Programmi di esempio
✕Riferimento del linguaggio Gem+
✕Print / Output
Print a value to the output console:
gemlog=Hello, World!
gemlog="Hello, {name}!"
Variables & Math
Declare or assign a variable:
gem x = 10 gem name = "Alice" gem x += 5
Conditionals
gemif x > 10 {
gemlog=Big!
gemelse
gemlog=Small.
}
Loops
gemloop 5 {
gemlog="Step {gemindex}"
}
Functions
gemfn sayHello {
gemlog=Hello!
}
gemcall sayHello
UI Creation (New!)
gemui clear gemui text title "Hello UI" gemui input myInp "Placeholder" gemui button btn "Submit" gemui style title "color: #22d3ee;" // Read inputs & bind events gemread varName myInp gemon click btn myFunc
User Input & Confirm
geminput=name "What is your name?" gemconfirm=ready "Are you ready?" gemnativeconfirm=sure "Are you sure?"
Are you sure?
No
Sì
Enter a value
Cancel
Invia
