1
1
Fork 0
mirror of https://github.com/QB64Official/qb64.git synced 2024-07-03 07:41:21 +00:00
qb64/internal/help/$LET.txt

35 lines
1.5 KiB
Plaintext
Raw Normal View History

2021-04-25 22:40:25 +00:00
[[$LET]] is a precompiler command, which is now usable by modern day [[cavemen]] to help include and exclude which sections of code compiles in their program based on OS/bit-size or other predefined conditions.
2016-03-18 11:36:04 +00:00
{{PageSyntax}}
2017-10-10 14:55:21 +00:00
: [[$LET]] variable = expression
2016-03-18 11:36:04 +00:00
2017-10-10 14:55:21 +00:00
{{PageDescription}}
* Unlike [[LET]], [[$LET]] is not optional.
2021-10-09 17:06:54 +00:00
* $LET A = 12 sets a precompiler variable "a" to the value of 12. This variable is only valid for the precompiler itself and does nothing to affect the values of any variable/constant which might also be called "a" in the program.
* Variable names must follow QB64's variable naming conventions.
2021-02-18 17:11:22 +00:00
* You can check a precompiler variable against special values '''DEFINED''' and '''UNDEFINED''', in order to assess whether the variable has already been assigned a value. Useful for code in libraries which may be repeated.
2021-10-09 17:06:54 +00:00
* The precompiler comes with some preset values which can be used to help determine which code blocks to include/exclude. These are:
** '''WIN''' or '''WINDOWS''' if the user is running QB64 in a Windows environment.
** '''LINUX''' if the user is running QB64 in a Linux environment.
** '''MAC''' or '''MACOSX''' if the user is running QB64 in a macOS environment.
** '''32BIT''' if the user is running a 32-bit version of QB64.
** '''64BIT''' if the user is running a 64-bit version of QB64.
** '''VERSION''', which is set to the version of the QB64 compiler.
2016-03-18 11:36:04 +00:00
2017-10-10 14:55:21 +00:00
{{PageExamples}}
* See example 1 in [[$IF]].
2016-03-18 11:36:04 +00:00
2017-10-10 14:55:21 +00:00
{{PageSeeAlso}}
2016-03-18 11:36:04 +00:00
* [[$IF]]
* [[$ELSE]]
* [[$ELSEIF]]
* [[$END IF]]
2017-10-10 14:55:21 +00:00
* [[Cavemen]]
2016-03-18 11:36:04 +00:00
2019-04-15 01:15:33 +00:00
{{PageNavigation}}