Author Topic: Documentation  (Read 65766 times)

0 Members and 1 Guest are viewing this topic.

JRS

  • Guest
Re: Documentation
« Reply #75 on: October 03, 2018, 03:41:09 AM »
That's like never experiencing sex.  :)

Quote from: Eros
if you start getting it ... it will open a great new world. It takes some time.
With iDispatch variables I will try to make COM Automation as easy as I can.

My hero!   8)
« Last Edit: October 03, 2018, 03:57:32 AM by John »

José Roca

  • Guest
Re: Documentation
« Reply #76 on: October 03, 2018, 05:05:49 AM »
I don't see how that might benefit you.

JRS

  • Guest
Re: Documentation
« Reply #77 on: October 03, 2018, 05:10:22 AM »
I guess you haven't been following my VB6 OCX DLL Forms project? With Eros's interest in COM/OLE automation, you now have two mature scripting languages going the same direction.

José Roca

  • Guest
Re: Documentation
« Reply #78 on: October 03, 2018, 05:36:49 AM »
I doubt that Eros will be interested in using VB6 OCX DLL Forms. I think that you're going to have a new disappointment.

JRS

  • Guest
Re: Documentation
« Reply #79 on: October 03, 2018, 05:40:20 AM »
I doubt that Eros will be interested in using VB6 OCX DLL Forms. I think that you're going to have a new disappointment.

Are you willing to put some money behind your bet?

José Roca

  • Guest
Re: Documentation
« Reply #80 on: October 03, 2018, 05:43:07 AM »
I have said I think, not I bet. Anyway, I don't care.

JRS

  • Guest
Re: Documentation
« Reply #81 on: October 03, 2018, 05:48:59 AM »
Quote
I don't care

That's a hit but it doesn't sink the ship.

Charles Pegge

  • Guest
Re: Documentation
« Reply #82 on: October 03, 2018, 07:56:10 AM »

Thank for your further details, José.

In FreeBasic, how would you handle the constructors of arrays of objects?

José Roca

  • Guest
Re: Documentation
« Reply #83 on: October 03, 2018, 08:17:31 AM »
I would need to have a dynamic instance array, eg.

m_rg (any) as <object type>

redim it according the number of elements of the passed array and copy them.

In Free Basic you can pass the array using <name of the array>() and get the number of elements with lbound and ubound, or you can pass a pointer to the first element and the number of elements.

JRS

  • Guest
Re: Documentation
« Reply #84 on: October 03, 2018, 05:33:58 PM »
The docs are looking great. Nice job!

José Roca

  • Guest
Re: Documentation
« Reply #85 on: October 03, 2018, 07:21:51 PM »
I have added more "literature" to the bitwise operators taken from Wikipedia.

JRS

  • Guest
Re: Documentation
« Reply #86 on: October 03, 2018, 07:52:10 PM »
I can't wait to see  José Roca INCLUDE files tailored for Oxygen Basic.

I see your documentation effort as putting Charles to the test.

A. Is the compiler usable?

B. Will my suggestions and bug discoveries be addressed promptly?

C. Will I have better luck with my includes within the O2 community?


« Last Edit: October 03, 2018, 08:07:27 PM by John »

Arnold

  • Guest
Re: Documentation - data types
« Reply #87 on: October 04, 2018, 04:05:12 AM »
Hi Charles,

when reading the documentation of José about data types I came across the number ranges of float/single, doubles and extended. Is there a way to find out the minimum and maximum representation of e.g. floats/singles which are 4 bytes in size?

As I do not understand the IEEE-754 standard, I searched in Internet for the ranges and found this:

Floating Point Primitive Data Types
Type           Size            Range                           Accuracy
float           32 bits    -3.4E+38 to +3.4E+38        about 7 decimal digits
double       64 bits    -1.7E+308 to +1.7E+308        about 16 decimal digits

I also found a floating point converter:
https://www.h-schmidt.net/FloatConverter/IEEE754.html

Attached are two images where I filled out the binary input fields. I do not know the difference of (not) filling the rightmost binary field.

Could I use \examples\Diagnostics\RegSnapShot.o2bas somehow to find the values? Although I have not understood the underlying theory to calculate floating point, it would be interesting to see if the calculations of O2 are similiar.

Roland


« Last Edit: October 05, 2018, 02:09:26 PM by Arnold »

Charles Pegge

  • Guest
Re: Documentation
« Reply #88 on: October 04, 2018, 07:18:31 AM »
Hi Roland,

This is an easy way to study floating-point bits: (using an int overlay)

Code: [Select]
float f=123.45
int i at @f
print hex(i,8)

the significand is in bits 0..22 (23bits)
the exponent is in bits 23..30 (8bits)
the sign is in bit 31

You can also find out what an infinity looks like (1/0) :)

JRS

  • Guest
Re: Documentation
« Reply #89 on: October 04, 2018, 08:52:56 AM »
Script BASIC has a couple of built-in functions to give you the MAXINT and MININT ranges. It would be nice to have a set of functions that would do the same for REAL (double) ranges.

Code: Script BASIC
  1. PRINT MAXINT,"\n"
  2. PRINT MININT,"\n"
  3.  
  4. PRINT (1/0),"\n"
  5.  


jrs@jrs-laptop:~/sb/examples/test$ scriba range.sb
9223372036854775807
-9223372036854775808
undef
jrs@jrs-laptop:~/sb/examples/test$



Charles example to view infinity just returns a undef in SB.  :(