External Identifier Naming Scheme

All C++ variable and functions accessible to LDPL programs must contain only A-Z, 0-9, and the _ character in their names. All other characters used on the LDPL side to reference the variable or function will get converted to an underscore (_) or, if it's a letter, capitalized.

LDPL => C++ Conversion Examples

LDPL Identifier

C++ Identifier

window.rows

WINDOW_ROWS

HTTP/get

HTTP_GET

SDL/Font.new

SDL_FONT_NEW

sdl.font-new

SDL_FONT_NEW

NAME

NAME

version_number

VERSION_NUMBER

Note that this conversion scheme can cause collisions: all of these LDPL variables will convert to ONE_TWO:

  • One-Two

  • one.two

  • one/two

  • OnE-TWO