Implicit delimiters

They are symbols that DinoCode infers for you, saving you the time of writing them.

Function execution#

They infer parentheses () in function calls.

# This:
print 10

# Is the same as this:
print(10)

Statements#

They infer the semicolon (;) at the end of each statement.

# This:
print 10
print 20

# Is the same as this:
print(10);
print(20);

Expressions#

They infer commas (,) between expressions.

# This:
print 1 2 3 4
print "10 * 20 = " 10 * 20

# Is the same as this:
print(1, 2, 3, 4);
print("10 * 20 = ", 10 * 20);
Intention inference

DinoCode handles delimiters for you, but it doesn’t mean you can’t use them at your convenience. The following example is completely valid:

print 1, 2, 3;
print(1, 2, 3);

When you should use delimiters#

There are specific cases where delimiters are necessary:

Negative numbers#

The sign of a negative number (-) can be confused with a subtraction if delimiters are not used:

# It's a subtraction of -1 and 2
print -1 -2   # -3 

# They are two different expressions
print -1, -2  # -1, -2
Unary operators

What are they? Unary operators operate with a single value ➡ - x (negative sign of a number). On the contrary, binary operators operate with two values ➡ x - y (subtraction).

Calling functions inside expressions#

If input is a function, then:

print input

Is it printing the value of the variable input or is it calling the input() function and passing the result to print?

Answer:

It prints the value of the variable input. Therefore, if your intention was to call the input() function, then you must use one of the following styles:

StyleExample
Classicfunction(arg arg2 ...)
Dollar$(function arg arg2 ...)
# Classic
print input("Write something: ")

# Dollar
print $(input "Write something: ")