Skip to content

Instantly share code, notes, and snippets.

@csergiu
Created October 11, 2015 18:05
Show Gist options
  • Save csergiu/7b2fb7611257bc95a24e to your computer and use it in GitHub Desktop.
Save csergiu/7b2fb7611257bc95a24e to your computer and use it in GitHub Desktop.
Hello!

The Slacker Programming Language v0.1

Data types:

  • shint: short integer, [-32767, +32767], word, from -(2 pow 15) to (2 pow 15) -1
  • char: char, byte, from -128 to 127

User defined data type:

dataType <dataTypeName> = 
{
    char c[15] = "My data type";
    shint someNumber;
};

Assignment:

shint someInt = 15;
char c = 'D';

Input/output:

shout someInt; // outputs 15
shout "Where ya at?"; // outputs string "Where ya at?"
whisper someInt; // reads number from keyboard and assigns it to someInt

Conditional:

if (thisHoesAintLoyal == 1) {
    shout "true";
else {
	shout "false";
}

Loop:

from (1) to (15) do {
    shout "Leeroy Jenkins";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment