Lumens To Watts
For those of us who are frustrated trying to understand which new light bulbs to buy
brihar73Mit dem iPhone scannen, um zu installieren
For those of us who are frustrated trying to understand which new light bulbs to buy.
Neue Funktionen
Version 1.0
First release
Was er macht
23 Aktionen-
Choose from MenuInput Type
-
Choose from Menulumens
-
Ask for InputValue
-
Set Variablelumens
-
Choose from Menuwatts (incandescent)
-
Ask for InputValue
-
Calculate
-
Set Variablelumens
-
Choose from Menuwatts (LED)
-
Ask for InputValue
-
Calculate
-
Set Variablelumens
-
If
-
Calculate
-
Round Number
-
Set Variablewatts_inc
-
Calculate
-
Round Number
-
Set Variablewatts_led
-
Show AlertResults
-
If
-
Show AlertResults
-
Stop This Shortcut
Als Code ansehen
Jede Aktion dieses Kurzbefehls als Cherri ausgeschrieben, eine Programmiersprache für Kurzbefehle. Ideal, um zu lernen, wie er funktioniert.
#include 'actions/math'
#define color yellow
#define glyph lightbulb
menu "Input Type" {
item "lumens":
const ProvidedInput = prompt("Value", "Number")
@lumens = ProvidedInput
item "watts (incandescent)":
const ProvidedInput = prompt("Value", "Number")
@lumens = ProvidedInput * 15
item "watts (LED)":
const ProvidedInput = prompt("Value", "Number")
@lumens = ProvidedInput * 90
}
if @lumens >= 1 {
const CalculationResult = @lumens / 15
ceil(CalculationResult, "Hundredths")
@watts_inc
const CalculationResult = @lumens / 90
ceil(CalculationResult, "Hundredths")
@watts_led
alert("Lumens: {@lumens}\nWatts (Incandescent): {@watts_inc}\nWatts (LED): {@watts_led}", "Results")
} else {
alert("Input number too low.", "Results")
}
stop()
In Cherri Playground öffnen
Mit cherri 2.3.0 (GPL-2.0) dekompiliert. Eventuell sind kleine Korrekturen nötig, bevor es kompiliert wird.
Bewertungen und Rezensionen
Rezension schreiben–
von 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Werbung
Mehr von brihar73
Das gefällt dir vielleicht auch
Werbung