Język programowania Gem+
Loading...
Gem+
Nowy język programowania
Przykłady Dokumentacja ▶ Run
Edytor
1
Wynik
Wyczyść wynik

Przykładowe programy

✕

Dokumentacja języka 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?
Nie Tak
Enter a value
Cancel Wyślij