User Tools

Site Tools


hpl2:amnesia:script_language_reference_and_guide:types

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
hpl2:amnesia:script_language_reference_and_guide:types [2012/12/28 02:30]
thegreatcthulhu some errors...
hpl2:amnesia:script_language_reference_and_guide:types [2013/01/03 14:18] (current)
thegreatcthulhu Deleted a sentence... Apparently, it was not true! :D Good!
Line 103: Line 103:
  
  
-    * //​Range://''​+/​- 3.402823466e+38'' ​ (or approximately:​ +/- 3</​38_zeros_here//>​.0)+    * //​Range://''​+/​- 3.402823466e+38'' ​ (or approximately:​ +/- 3<//​38_zeros_here//>​.0)
     * //Smallest positive value://''​1.175494351e-38'' ​ ( or: 0.<//​37_zeros_here//>​1175494351 )     * //Smallest positive value://''​1.175494351e-38'' ​ ( or: 0.<//​37_zeros_here//>​1175494351 )
     * //​Precision://''​6-7 digits'' ​     * //​Precision://''​6-7 digits'' ​
Line 119: Line 119:
  
 The ''​bool'' ​ type is used to represent the values ''​true'' ​ and ''​false''​. Variables of ''​bool'' ​ type are useful //as indicators//​. You can use them to represent binary states (for example, on/off switches), or indicate if some event happened or not. You can use them as return values of functions, to indicate the success or failure of an operation. \\ The ''​bool'' ​ type is named after George Boole, an English mathematician,​ philosopher and logician, who first defined an algebraic system of logic in the mid 19th century. The ''​bool'' ​ type is used to represent the values ''​true'' ​ and ''​false''​. Variables of ''​bool'' ​ type are useful //as indicators//​. You can use them to represent binary states (for example, on/off switches), or indicate if some event happened or not. You can use them as return values of functions, to indicate the success or failure of an operation. \\ The ''​bool'' ​ type is named after George Boole, an English mathematician,​ philosopher and logician, who first defined an algebraic system of logic in the mid 19th century.
 +
 +For more info about the operations available for the ''​bool''​ type, see [[hpl2:​amnesia:​script_language_reference_and_guide:​control_flow_-_conditional_statements#​comparison_operators|Comparison Operators]] and [[hpl2:​amnesia:​script_language_reference_and_guide:​control_flow_-_conditional_statements#​using_logical_operators|Using Logical Operators]].
  
  
Line 130: Line 132:
 string aString = ""​ + anInteger;​ //​ "​10"​ is stored in aString variable string aString = ""​ + anInteger;​ //​ "​10"​ is stored in aString variable
 </​code>​ </​code>​
- 
- 
-//​Note:// ​ Due to implementation details, when strings are passed as parameters to functions, they must always be passed by reference; otherwise, the game might crash, or the script will simply stop executing. 
  
  
hpl2/amnesia/script_language_reference_and_guide/types.1356661814.txt.gz ยท Last modified: 2012/12/28 02:30 by thegreatcthulhu