Difference between revisions of "SINGLE"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Clippy
m
 
Line 17: Line 17:
  
 
{{PageSeeAlso}}
 
{{PageSeeAlso}}
* {{KW|DIM}}, {{KW|DEFSNG}}
+
* [[DIM]], [[DEFSNG]]
* {{KW|MKS$}}, {{KW|CVS}}
+
* [[MKS$]], [[CVS]]
* {{KW|DOUBLE}}, {{KW|_FLOAT}}
+
* [[DOUBLE]], [[_FLOAT]]
* {{KW|LEN}}
+
* [[LEN]]
 +
* [[Variable Types]]
  
  
 
{{PageNavigation}}
 
{{PageNavigation}}

Latest revision as of 21:08, 24 July 2012

SINGLE variables are 4 byte floating decimal point numerical values up to seven digits in length.


Syntax

DIM variable AS SINGLE


Description

  • Values can range up to 7 digits. Decimal point accuracy depends on whole value places taken.
  • Single is the default variable type assigned to undefined variables without a type suffix.
  • Variable suffix type designation is !. Suffix can also be placed after a literal numerical value by user or automatically by the IDE.
  • Values returned may be expressed using exponential or scientific notation using E for SINGLE or D for DOUBLE precision.
  • Floating decimal point numerical values cannot be _UNSIGNED!
  • Values can be converted to 4 byte ASCII string values using _MKS$ and back with _CVS.
  • Warning: Qbasic keyword names cannot be used as numerical variable names with or without the type suffix!


See also



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page