Langage de programmation Gem+
Loading...
Gem+
Un nouveau langage de programmation
Exemples Docs ▶ Run
Éditeur
1
Sortie
Effacer la sortie

Programmes d'exemple

✕

Référence du langage 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?
Non Oui
Enter a value
Cancel Envoyer