Keywords
Keywords are words predefined by the Hugo compiler as part of the language. You can’t use a keyword as a property, an attribute, a variable or the name of a routine.
Here are a list of names that you should not use as your own identifiers either because they are standard keywords, are predefined properties, attributes, constants and variables that you should not redefine unless you know exactly what you are doing, in order to be able to use certain features of the standard libraries, or, if you incorrectly use a keyword as an identifier, you may not be able to successfully compile your program until you fix the issue.
Kind of item | Identifiers | Notes |
---|---|---|
List of all keywords | alias, and, anything, array, at, attribute, break, call, capital, case, child, children, class, cls, color, colour, dict, do, elder, eldest, else, elseif, false, for, held, hex, if, in, input, is, jump, local, locate, move, multi, multiheld, multinotheld, music, nearby, newline, not, notheld, number, object, or, parent, parse$, pause, picture, playback, print, printchar, property, quit, random, readfile, readval, recordoff, recordon, remove, restart, restore, return, routine, run, runevents, save, scriptoff, scripton, select, serial$, sibling, sound, string, system, text, to, true, undo, verb, while, window, writefile, writeval, xobject, xverb, younger, youngest | Most of these words cannot be redefined as a private property or attribute, or constant or variable, and, for the ability to understand your program, you probably wouldn’t want to anyway |
Screen Colors | BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, WHITE, DARK_GRAY, LIGHT_BLUE, LIGHT_GREEN, LIGHT_CYAN, LIGHT_RED, LIGHT_MAGENTA, LIGHT_YELLOW, BRIGHT_WHITE | If you’re not planning to reset the screen colors you may be able to reuse some of these names if you wish |
Operators | and, false, is, not, or, true | You probably cannot - and probably wouldn’t want to - use these except as indicated on the page on operators. Some of these also represent boolean values |
User commands | verb, xobject, xverb | These are the general instructions you give to the compiler to define the words the user can type into your program to give commands on what they want to do |
Programming Instructions | break, call, case, cls, color, colour, do, else, elseif, for, if, input, jump, move, pause, playback, print, printchar, quit, random, readfile, readval, recordoff, recordon, remove, restart, restore, return, routine, run, runevents, save, scriptoff, scripton, select, sound, system, window, writefile, writeval | These commands allow you to describe the actions the run-time system is to take while handling the code for your program. |
Functions | anything, capital, child, children, dict, elder, eldest, held, hex, newline, number, parent, parse$, playback, random, recordoff, recordon, restart, restore, save, scriptoff, scripton, serial$, sibling, string, system, to, undo, youngest | These are functions used to provide services to your program so you don’t have to write the function to do them yourself. |
System() function operands | READ_KEY, NORMALIZE_RANDOM, INIT_RANDOM, PAUSE_SECOND, PAUSE_100TH_SECOND, GAME_RESET, SYSTEM_TIME, MINIMAL_INTERFACE | If you don’t use the System() function you can probably use these as identifiers if you wanted to. |
Compiler defined properties and routines | adjective, after, article, before, name, noun | The Hugo Compiler predefines these as properties or internal routines available for all objects. You should not use these as identifiers except for the specific properties or routines. |
The following properties are defined by the standard library hugolib.h, and if you want to use this standard library, you probably should not reuse these identifiers for anything other than the specified purposes.
See Also: operators