Appendix A: Keyword Reference

Keyword Description
val / varDeclare a constant / variable.
defDefines a function.
classDefines a class.
if / elseConditional branching.
while / forLooping constructs.
break / continueLoop control.
returnReturn a value from a function.
printPrint a value to the console.
importImport another REDLINE module.
pubMake a function or class public.
newAllocate a new object instance.
thisReference the current object instance.
try / catchHandle runtime errors.
true / falseBoolean literals.

Appendix B: Standard Library Quick Reference

  • System: args, len, append, sort, reverse, find, to_string, to_int, to_float
  • I/O: print, input
  • File System: read_file, write_file, exists, mkdir, remove, list_dir
  • Time: time, sleep
  • Random: random_int, random_float