Oxygen Basic

Information => Reference => Topic started by: kryton9 on June 27, 2011, 12:54:32 AM

Title: Oxygen Quick Reference
Post by: kryton9 on June 27, 2011, 12:54:32 AM
I will update this quick reference in this post as I learn more about Oxygen and we get more insight from Charles in the forums.
Let me know of any tips I have missed here and I will add them to the quick reference.

Update: 2011.06.30 05:46
Title: Re: Oxygen Quick Reference
Post by: Charles Pegge on June 27, 2011, 03:50:59 AM
Kent,

Thanks for the list. I've taken out quite a few C words, not used in Oxygen.

The best reference is src/o2keyw.bas. This is one of the Oxygen source files and is also used by the manual generator. Think of it as a database.

I update it frequently. But the secondary keywords are not directly read from here so they are a bit out of sync.


Charles
Title: Re: Oxygen Quick Reference
Post by: kryton9 on June 27, 2011, 04:39:11 AM
Attached is the program I wrote to get the size of the various variable types.
Title: Variable Max Range
Post by: kryton9 on June 27, 2011, 04:23:16 PM
I wrote this program to figure out the maximum range for a variable. But what it shows and what can be assigned don't match?
Title: Re: Oxygen Quick Reference
Post by: Charles Pegge on June 27, 2011, 08:00:35 PM

Thanks Kent,

Interesting that String comes out to 0!

Float / Single / Double / Extended won't give you the correct result since
the range is determined by the number of exponent bits.
xmm/SSE registers vary according to instruction: 4*32   2*64   1*128

Code: [Select]
---------------------------------------------------------------------
C Type Size in bits Exponent  Significand    Register
=====================================================================
float      32         8         23             SSE single precision
double      64         11        52             SSE double precision
long double  80         15        63+leading 1 memory + x87 stack
__float128   128        15        112          SSE 128bit
=====================================================================

Charles

http://en.wikipedia.org/wiki/Floating_point
http://locklessinc.com/articles/classifying_floats/
Title: Re: Oxygen Quick Reference
Post by: kryton9 on June 30, 2011, 01:47:57 AM
I updated the reference today.