Author Topic: Oxygen Variable Types  (Read 3334 times)

0 Members and 1 Guest are viewing this topic.

kryton9

  • Guest
Oxygen Variable Types
« on: June 25, 2011, 06:31:54 PM »
Charles, I prepared a chart for you to fill out when you have some time. I did a few to show how it is setup. I know this will be helpful to understand all of the variable types in Oxygen better.

I started with a chart from a C reference site, but there are many... I have no idea where to place.

Quote
List from Oxygen Help of Variables:

Once you placed them below in the chart,
place a + afterwards for each time placed.
I did a few as an example.

any
asciiz
bool
bstr
bstring
bstring2
byte +
char +
cpu
cstring
double +
dword
ext
extended
gstring
float +
fpu
int
integer
long
mmx
quad
qword
short +
single
string
sys
ubyte
uint +
ulong
void
word
wstring
xmm
zstring
zstring2

* refers to C variables

Variable Types in Oxygen
===============================================================================
Type                                           Allowed Ranges     
===============================================================================
byte
char
short
*char                                       -128 to 127 or 0 to 255
===============================================================================
*signed char                               -128 to 127   
===============================================================================
*unsigned char                                  0 to 255       
===============================================================================
*signed short int                         -32768 to 32,767
===============================================================================
*unsigned short int                            0 to 65,535   
===============================================================================
*signed int                       -2,147,483,648 to 2,147,483,647
===============================================================================
uint
*unsigned int                                  0 to 4,294,967,295
===============================================================================
*signed long int                  -2,147,483,648 to 2,147,483,647
===============================================================================
*unsigned long int                             0 to 4,294,967,295
===============================================================================
*signed long long int -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
===============================================================================
*unsigned long long int                        0 to 18,446,744,073,709,551,615
===============================================================================
float
*float                                   1×10-37 to 1×10^37   
===============================================================================
double
*double                                 1×10-308 to 1×10^308
===============================================================================
*long double                            1×10-308 to 1×10^308
« Last Edit: June 30, 2011, 01:28:07 AM by kryton9 »

Charles Pegge

  • Guest
Re: Oxygen Variable Types
« Reply #1 on: June 25, 2011, 07:42:51 PM »

Thanks Kent.

I know there are far too many variable types for comfort. I advocate the use of the sys type wherever possible for 64 bit compatibility. And 90% of programming needs can be met with 5 types: sys string zstring single and double.

Charles

kryton9

  • Guest
Re: Oxygen Variable Types
« Reply #2 on: June 25, 2011, 09:06:59 PM »
I'm going to make a quick reference for Oxygen and help to put on my website, so when you have time, if you can fill that info for me it will be helpful!

kryton9

  • Guest
Re: Oxygen Variable Types
« Reply #3 on: June 30, 2011, 01:34:02 AM »
I updated the file, if you view it, use courier new size 10 and it should line up nicely.

I still haven't been able to assign 18,446,744,073,709,551,615 to a variable yet.

Code: OxygenBasic
  1. quad q = 18446744073709551615
  2. print str( q )
  3.  
  4. extended e = 18446744073709551615
  5. print str( e )
  6.  
  7. 'both cases I get: -9.2233720368547758E+18