![]() ![]() Without either of those, the number will be treated as decimal. To indicate a hexadecimal number, or with the % symbol to indicate a binary number. When using numbers in an expression, you can prefix them with the $ symbol Modules Modules use a :: (double colon) when referencing a module name.īe careful not to confuse these with the single colon used by labels.Īn expression is something which can be evaluated.Īn expression can mix any variables, constants, or functions, of the same type. Labels defined inside a procedure will be available only in that procedure. Label names may not contain any operators ( ,-.) or special characters (ß,ä,ö,ü.). Warning: On Windows, \t does not work with the graphical functions of the 2DDrawing and VectorDrawing libraries.Įxample a$ = "Hello world" standard stringī$ = ~"Escape\nMe !" string with escape sequencesĪll labels must be followed by a colon : character. This can be used for APIįunctions requiring a null pointer to a string, or to really free a string. #Empty$: represents an empty string (exactly the same as "") There are two special constants for strings: Literal strings are declared using the " character.Įscape sequences are supported by prepending the ~ character to the literal string. (The compiler replaces all constant names with their corresponding values when compiling the executable.) They can only be declared once in the source and always keep their predefined values. Functions are regularly included in the PureBasic "Command libraries", described on the right side ofĪll constants are preceded by the hash # character. ElseĮndIf Keywords are regularly described in the chapters on the left side ofĮvery function must be followed by an opening round bracket '(' character, otherwise it will not be considered a function (this applies also to functions without parameters).Įxample EventWindow() it is a function.ĮventWindow it is a variable. They are not followed by the brackets '()', which areĮxample If a = 1 If, Else and EndIf are keywords while 'a = 1' Or controlling the program flow (If : Else : EndIf). These are:Įxample If a = 10 This is a comment to indicate something.Īll keywords are used for general things inside PureBasic, like creating arrays (Dim) or lists (NewList), PureBasic has established rules which never change.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |