Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
PureBasic
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Data types === Variable data type specified when you first use it (and optionally - in the future), and is separated from the name of the point. There is a set of basic types - {{mono|.f, .d}} (float and double numbers), {{mono|.b, .c, .w, .l, .q}} (integers - from single-byte and 8-byte), {{mono|.s}} - strings. {| class="wikitable" |- ! Type !! Suffix !! Memory usage !! Numerical range |- | Byte || {{mono|b}} || 1 byte (8 bits) || β128 ... +127 |- | Ascii || {{mono|a}} || 1 byte (8 bits) || 0 ... +255 |- | Character || {{mono|c}} || 1 byte (8 bits) (ascii) || 0 ... +255 |- | Word || {{mono|w}} || 2 bytes (16 bits) || β32768 ... +32767 |- | Unicode || {{mono|u}} || 2 bytes (16 bits) || 0 ... +65535 |- | Character || {{mono|c}} || 2 bytes (16 bits) (unicode) || 0 ... +65535 |- | Long || {{mono|l}} || 4 bytes (32 bits) || β2147483648 ... +2147483647 |- | Integer || {{mono|i}} || 4 bytes (32 bits) x86 || β2147483648 ... +2147483647 |- | Float || {{mono|f}} || 4 bytes (32 bits) || Depending on the ratio of the decimal number. |- | Integer || {{mono|i}} || 8 bytes (64 bits) x64 || β9223372036854775808 ... +9223372036854775807 |- | Quad || {{mono|q}} || 8 bytes (64 bits) || β9223372036854775808 ... +9223372036854775807 |- | Double || {{mono|d}} || 8 bytes (64 bits) || Depending on the ratio of the decimal number. |- | String || {{mono|s}} || (String length + 1) * [[sizeof|SizeOf]](Character) || No limit. |- | Fixed String || {{mono|s{length}}} || (String length) * SizeOf(Character) || No limit. |} * {{mono|Len(String)}} used to count the length of a string will not exceed the first [[null character]] ({{mono|Chr(0)}}). In addition to basic types, the user can define the type of construction via <syntaxhighlight lang="text"> Structure type_name field_name.type ; Single field. Perhaps the structures attachment. field_name[count].type ; Static arrays. ; ... ; Optional construction StructureUnion .. EndStructureUnion allows you ; to combine multiple fields into one area of memory ; that is sometimes required for the conversion types. StructureUnion type_name.type ; ... EndStructureUnion EndStructure </syntaxhighlight> Variables can be single (actually, standard variables), [[dynamic array]] (declared using the {{code|lang=blitzbasic|Dim var_name.type_name (size1, size2, ... )}}, a [[linked list]] ({{code|lang=blitzbasic|List() var_name.type_name}}), an [[associative array]] (in new versions of language) ({{code|Map var_name.type_name()}})
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)