![]() you can specify the length of the string to minimize memory usage my_str : ch_array // you can declare variables of custom types my_2d : md_array // dynamically sized arrays need to be sized before they can be used. s : string // a string with maximum length of 50 chars. ![]() Program Learn_More //Let's learn about data types and their operations const PI = 3.141592654 GNU = 'GNU '' s Not Unix' // constants are conventionally named using CAPS // their values are fixed and cannot be changed during runtime // holds any standard data type (integer, real, boolean, char, string) type ch_array : array of char // arrays are new 'types' specifying the length and data type // this defines a new data type that contains 255 characters // (this is functionally equivalent to a string variable) md_array : array of array of integer // nested arrays are equivalent to multidimensional arrays // can define zero (0) length arrays that are dynamically sized // this is a 2-dimensional array of integers //Declaring variables var int, c, d : integer // three variables that contain integer numbers // integers are 16-bits and limited to the range r : real // a variable that contains a real number data types // reals can range between bool : boolean // a variable that contains a Boolean(True/False) value ch : char // a variable that contains a character value // char variables are stored as 8-bit data types so no UTF str : string // a non-standard variable that contains a string value // strings are an extension included in most Pascal compilers // they are stored as an array of char with default length of 255.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |