Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
169 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{{fbdoc item="title" value="__FB_JS__"}}---- | ||
Intrinsic define set by the compiler | ||
|
||
{{fbdoc item="syntax"}}## | ||
""__FB_JS__"" | ||
## | ||
{{fbdoc item="desc"}} | ||
Define without a value created at compile time in the emscripten version of the compiler, when the ##-target js-asmjs## command line option is used. It can be used to compile parts of the program only for a such target. | ||
|
||
{{fbdoc item="ex"}} | ||
{{fbdoc item="filename" value="examples/manual/defines/fbjs.bas"}}%%(freebasic) | ||
#IFDEF __FB_JS__ | ||
'...instructions only for emscripten target... | ||
#ELSE | ||
'...instructions not for emscripten target... | ||
#ENDIF | ||
%% | ||
{{fbdoc item="diff"}} | ||
- New to ""FreeBASIC"" | ||
|
||
{{fbdoc item="see"}} | ||
- [[DevBuildEmscripten|Compiling FB with Emscripten]] | ||
|
||
{{fbdoc item="back" value="CatPgDddefines|Intrinsic Defines"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
{{fbdoc item="title" value="#ELSEIFDEF"}}---- | ||
Preprocessor conditional directive | ||
|
||
{{fbdoc item="syntax"}}## | ||
[[KeyPgPpifdef|#ifdef]] A | ||
' Conditionally included statements if A is defined | ||
**#elseifdef** B | ||
' Conditionally included statements if A is not defined and B is defined | ||
[[KeyPgPpelse|#else]] | ||
' Conditionally included statements if both A and B are not defined | ||
[[KeyPgPpendif|#endif]] | ||
## | ||
{{fbdoc item="desc"}} | ||
**#elseifdef** can be added to an ##[[KeyPgPpif|#if]]## block to provide an additional condition. | ||
|
||
##**#elseifdef** //symbol//## is equivalent to ##[[KeyPgPpelseif|#elseif]] [[KeyPgDefined|defined]] (//symbol//)## | ||
|
||
{{fbdoc item="ex"}} | ||
{{fbdoc item="filename" value="examples/manual/prepro/elseifdef.bas"}}%%(freebasic) | ||
#DEFINE B | ||
|
||
#IFDEF A | ||
Print "A is defined" | ||
#ELSEIFDEF B | ||
Print "A is not defined and B is defined" | ||
#ELSE | ||
Print "both A and B are not defined" | ||
#ENDIF | ||
%% | ||
{{fbdoc item="ver"}} | ||
- Since fbc 1.20.0 | ||
|
||
{{fbdoc item="diff"}} | ||
- New to Freebasic | ||
|
||
{{fbdoc item="see"}} | ||
- ##[[KeyPgPpdefine|#define]]## | ||
- ##[[KeyPgPpmacro|#macro]]## | ||
- ##[[KeyPgPpif|#if]]## | ||
- ##[[KeyPgPpelse|#else]]## | ||
- ##[[KeyPgPpelseif|#elseif]]## | ||
- ##[[KeyPgPpelseifndef|#elseifndef]]## | ||
- ##[[KeyPgPpendif|#endif]]## | ||
- ##[[KeyPgPpifdef|#ifdef]]## | ||
- ##[[KeyPgPpifndef|#ifndef]]## | ||
- ##[[KeyPgPpundef|#undef]]## | ||
- ##[[KeyPgDefined|defined]]## | ||
|
||
|
||
{{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{{fbdoc item="title" value="#ELSEIFNDEF"}}---- | ||
Preprocessor conditional directive | ||
|
||
{{fbdoc item="syntax"}}## | ||
[[KeyPgPpifdef|#ifdef]] A | ||
' Conditionally included statements if A is defined | ||
**#elseifndef** B | ||
' Conditionally included statements if both A and B are not defined | ||
[[KeyPgPpelse|#else]] | ||
' Conditionally included statements if A is not defined and B is defined | ||
[[KeyPgPpendif|#endif]] | ||
## | ||
{{fbdoc item="desc"}} | ||
**#elseifndef** can be added to an ##[[KeyPgPpif|#if]]## block to provide an additional condition. | ||
|
||
##**#elseifndef** //symbol//## is equivalent to ##[[KeyPgPpelseif|#elseif]] [[KeyPgOpNot|Not]] [[KeyPgDefined|defined]](//symbol//)## | ||
|
||
{{fbdoc item="ex"}} | ||
{{fbdoc item="filename" value="examples/manual/prepro/elseifndef.bas"}}%%(freebasic) | ||
#IFDEF A | ||
Print "A is defined" | ||
#ELSEIFNDEF B | ||
Print "both A and B are not defined" | ||
#ELSE | ||
Print "A is not defined and B is defined" | ||
#ENDIF | ||
%% | ||
{{fbdoc item="ver"}} | ||
- Since fbc 1.20.0 | ||
|
||
{{fbdoc item="diff"}} | ||
- New to Freebasic | ||
|
||
{{fbdoc item="see"}} | ||
- ##[[KeyPgPpdefine|#define]]## | ||
- ##[[KeyPgPpmacro|#macro]]## | ||
- ##[[KeyPgPpif|#if]]## | ||
- ##[[KeyPgPpelse|#else]]## | ||
- ##[[KeyPgPpelseif|#elseif]]## | ||
- ##[[KeyPgPpelseifdef|#elseifdef]]## | ||
- ##[[KeyPgPpendif|#endif]]## | ||
- ##[[KeyPgPpifdef|#ifdef]]## | ||
- ##[[KeyPgPpifndef|#ifndef]]## | ||
- ##[[KeyPgPpundef|#undef]]## | ||
- ##[[KeyPgDefined|defined]]## | ||
|
||
|
||
{{fbdoc item="back" value="CatPgPreProcess|Preprocessor"}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.