Knowledge Base

Blog Faq400

Frida-i Quick Poll: RPG IF-ELSEIF or SELECT-WHEN? (EN)

blog
Last Updated on 13 September 2019 by Roberto De Pedrini IF_ELSEIF or SELECT_WHEN? It’s a battle from RPGers on different forums… who like IF_ELSEIF and who like SELECT_WHEN to control flow on multiple conditions. Let’s start by saying that IF-ELSEIF and SELECT-WHEN are the exact same thing from a point in the program flow and the performance of the code itself, so these following two pieces of code do exactly the same thing: if YourAge<30; dsply 'Oh, you are very young!' 'inp; elseif YourAge<40; dsply 'You are young!' 'inp; elseif YourAge<50; dsply 'OK you are still young!' 'inp; elseif YourAge<60; dsply 'Oh, you were young once!' 'inp; else; dsply 'Oh yeah, it's RPG!...' 'inp; ENDIF; select …

Riservato agli iscritti

Per leggere l'articolo completo serve un account Faq400: è gratuito e ti dà accesso anche a Willi, l'assistente AI, e a tutta la Knowledge Base.

Prova a chiederlo a Willi

Willi, l'assistente AI della community, risponde a queste domande usando questo articolo e le altre fonti Faq400. È gratuito: iscriviti e ricevi subito la risposta.

Chi legge questo, legge anche