; this is a Beginning Student Level Racket Language ; (BSL Racket) comment ; (everything from a semicolon to the end of the line ; is IGNORED by the computer, ; it is for a human reader) ; syntax: a programming language's grammar, ; its RULES for writing expressions that ; the program translator (compiler, interpreter) ; can "understand" and translate ; semantics: the MEANING of an expression or ; statement in a programming language ; almost every expression, simple or compound, ; has a data type (what kind or type of value it is) ; ...the syntax for a simple expression depends ; on its data type ; BSL Racket supports a number of built in DATA TYPES ; (and you can create your own, but later) ; one of these built-in data types: number ; some of the syntax rules for a simple expression ; of data type number: ; * a sequence of digits (0-9) is considered ; a simple expression of type number ; * you can have a decimal point (just one!) ; * you can start the expression with a + or - ; these are all simple expressions of type number 13 13.14 -13.6666666 +5.7 ; another built-in data type in BSL Racket: ; string ; a simple expression of type string ; has the syntax: ; * starts with a double-quote ; * ends with a double-quote ; * with whatever characters you want in between "howdy" "Now is the time for Racket!" "13.14" ; yes, this is a simple expression of type string, ; also "is this an oK string?" ; another data type: boolean ; in BSL Racket, the boolean type has exactly ; two possible values, ; and they are: #true #false ; oh wow, BSL Racket allows you to type ; true for #true ; and ; false for #false true false ; in BSL Racket, you can combine simple expressions ; within compound expressions ; (actually: operators/operations and simple expressions) ; syntax: ; * starts with an open parenthesis ; * followed by an operator or operation (or function ; name) ; * followed by one or more expressions ; (the operator and its expressions are separated ; by white space: blank, tab, newline) ; * ending with a closing parenthesis ; + is an arithmetic operator that expects expressions ; of type number and returns the sum of those number ; expressions (+ 2 7 8) (+ (+ 2 7 8) 45.7) (+ #true 3)