-
Notifications
You must be signed in to change notification settings - Fork 76
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
18 changed files
with
1,337 additions
and
953 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
################# | ||
Variant data type | ||
################# | ||
|
||
The variant datatype can store most base types. | ||
|
||
.. code-block:: | ||
var | ||
v: Variant; | ||
begin | ||
WriteLn('Should be unassigned: ', not v.IsAssigned()); | ||
WriteLn(); | ||
v := 'I am a string'; | ||
Writeln('Now should *not* be unassigned: ', v.IsAssigned()); | ||
WriteLn('And should be string:'); | ||
WriteLn(v.VarType, ' -> ', v); | ||
WriteLn(); | ||
v := Int64(123); | ||
WriteLn('Now should be Int64:'); | ||
WriteLn(v.VarType, ' -> ', v); | ||
WriteLn(); | ||
v := 0.123456; | ||
WriteLn('Now should be Double:'); | ||
WriteLn(v.VarType, ' -> ', v); | ||
end; | ||
.. Note:: | ||
|
||
If curious to how the Variant datatype works, internally it's a record: | ||
|
||
.. code-block:: | ||
// pseudo code | ||
type | ||
InternalVariantDataType = record | ||
VarType: EVariantType; | ||
Value: array[0..SizeOf(LargestDataTypeVariantCanStore)] of Byte; | ||
end; |
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 |
---|---|---|
|
@@ -8,5 +8,6 @@ Tutorials | |
Sleep Until.rst | ||
Input & Finder Target.rst | ||
Mouse & Keyboard.rst | ||
Variant Data Type.rst | ||
|
||
plugins/index.rst |
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.