diff --git a/src/common-concepts/variables.md b/src/common-concepts/variables.md index 477e08a..39b6896 100644 --- a/src/common-concepts/variables.md +++ b/src/common-concepts/variables.md @@ -69,6 +69,10 @@ For example: static my_int: int = 20 ``` +::: tip +C++ linked variables can't be static. +::: + ## Global Variables Global variables are in the main scope of the program and are static variables by nature. Therefore, variables in the global scope must be declared as static. @@ -82,6 +86,10 @@ fn main() { } ``` +::: tip +C++ linked globals can be declare via `let` keyword. +::: + ## Multiple Assignment / Declaration You can multiple variable assignment or declaration. What? Sure, you can use two type in same statement. You know how to declare variable, okay it is same. The single difference, identifiers and expressions separate with comma. diff --git a/src/standard-library/std-debug.md b/src/standard-library/std-debug.md index c046b7e..03f6d5c 100644 --- a/src/standard-library/std-debug.md +++ b/src/standard-library/std-debug.md @@ -1,5 +1,5 @@ # std::debug ## Globals -### `mut let ENABLE: bool` +### `static mut ENABLE: bool` If this is enabled, debug and all subpackages assume that the program has been compiled for debugging. In this case the debugging tools work. However, if it is not enabled, the debugging tools will not work because it assumes that the program was not compiled for debugging. \ No newline at end of file diff --git a/src/standard-library/std-jule-build.md b/src/standard-library/std-jule-build.md index 05e9265..925cc46 100644 --- a/src/standard-library/std-jule-build.md +++ b/src/standard-library/std-jule-build.md @@ -6,13 +6,13 @@ Extension (includes dot) of Jule source code files. --- -### `let mut OS: str` +### `let static OS: str` Target operating system. \ Setted to current operating system by default. --- -### `let mut ARCH: str` +### `let static ARCH: str` Target architecture. \ Setted to current architecture by default. @@ -38,47 +38,47 @@ Identifier of initializer function. --- -### `let DIRECTIVES: [...]Directive` +### `static DIRECTIVES: [...]Directive` List of all directives. --- -### `let CPP_HEADER_EXTS: []str` +### `static CPP_HEADER_EXTS: [...]str` Valid extensions of C++ headers. --- -### `let CPP_EXTS: []str` +### `static CPP_EXTS: [...]str` Valid extensions of C++ source files. --- -### `let OBJECTIVE_CPP_EXTS: []str` +### `static OBJECTIVE_CPP_EXTS: [...]str` Valid extensions of Objective-C++ source files. --- -### `let ERRORS: [str:str]` +### `static ERRORS: [str:str]` Error messages. --- -### `let DISTOS: []Os` +### `static DISTOS: [...]Os` List of supported operating systems. --- -### `let DISTARCH: []Arch` +### `static DISTARCH: [...]Arch` List of supported architectures. --- -### `let DIRECTIVE_PREFIX: str` +### `const DIRECTIVE_PREFIX: str` Prefix of directive comments. --- -### `let PATH_STDLIB: str` +### `static PATH_STDLIB: str` Path of standard library. ::: warning Initialized by initializer function. @@ -86,7 +86,7 @@ Initialized by initializer function. --- -### `let PATH_EXEC: str` +### `static PATH_EXEC: str` Path of executable file's directory. ::: warning Initialized by initializer function. @@ -94,7 +94,7 @@ Initialized by initializer function. --- -### `let PATH_WD: str` +### `static PATH_WD: str` Path of working directory. ::: warning Initialized by initializer function. @@ -102,7 +102,7 @@ Initialized by initializer function. --- -### `let PATH_API: str` +### `static PATH_API: str` Path of main API header file. ::: warning Initialized by initializer function. diff --git a/src/standard-library/std-jule-lex.md b/src/standard-library/std-jule-lex.md index d19f389..7ecd297 100644 --- a/src/standard-library/std-jule-lex.md +++ b/src/standard-library/std-jule-lex.md @@ -1,38 +1,38 @@ # std::jule:lex ## Globals -### `let PUNCTS: []rune` +### `static PUNCTS: [...]rune` Punctuations. --- -### `let SPACES: []rune` +### `static SPACES: [...]rune` Space characters. --- -### `let UNARY_OPS: []TokenKind` +### `static UNARY_OPS: [...]TokenKind` Kind list of unary operators. --- -### `let BIN_OPS: []TokenKind` +### `static BIN_OPS: [...]TokenKind` Kind list of binary operators. --- -### `let WEAK_OPS: []TokenKind` +### `static WEAK_OPS: [...]TokenKind` Kind list of weak operators.\ These operators are weak, can used as part of expression. --- -### `let POSTFIX_OPS: []TokenKind` +### `static POSTFIX_OPS: [...]TokenKind` List of postfix operators. --- -### `let ASSIGN_OPS: []TokenKind` +### `static ASSIGN_OPS: [...]TokenKind` List of assign operators. ## Functions diff --git a/src/standard-library/std-jule-types.md b/src/standard-library/std-jule-types.md index e555072..088bbca 100644 --- a/src/standard-library/std-jule-types.md +++ b/src/standard-library/std-jule-types.md @@ -7,18 +7,26 @@ Possible values are: 32, and 64. --- -### `let SYS_INT: str` +### `static SYS_INT: str` Signed integer kind of runtime architecture.\ Is equavalent to `int`, but specific bit-sized integer kind.\ Accept as constant. +::: warning +Setted by initializer function. +::: + --- -### `let SYS_UINT: str` +### `static SYS_UINT: str` Unsigned integer kind of runtime architecture.\ Is equavalent to `uint` and `uintptr`, but specific bit-sized integer kind.\ Accept as constant. +::: warning +Setted by initializer function. +::: + --- ### `MAX_F32` diff --git a/src/standard-library/std-os.md b/src/standard-library/std-os.md index 1b7dcf1..afb1de2 100644 --- a/src/standard-library/std-os.md +++ b/src/standard-library/std-os.md @@ -1,6 +1,6 @@ # std::os ## Globals -### `let ARGS: []str` +### `static ARGS: []str` Holds the command-line arguments.\ Starts with the program name. ::: warning @@ -11,7 +11,7 @@ You got nil slice if used as initialize expression to any global. --- -### `let ENV: []str` +### `static ENV: []str` Holds the environment variables. ::: warning Environment variables sets at runtime with init function. \ diff --git a/src/standard-library/std-sys.md b/src/standard-library/std-sys.md index 84d4ddc..9935060 100644 --- a/src/standard-library/std-sys.md +++ b/src/standard-library/std-sys.md @@ -39,15 +39,15 @@ Available on: `windows` --- -### `let STDIN: uintptr` +### `static STDIN: uintptr` --- -### `let STDOUT: uintptr` +### `static STDOUT: uintptr` --- -### `let STDERR: uintptr` +### `static STDERR: uintptr` ---