Search found 8957 matches

by fxm
Jun 26, 2019 15:01
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1846

Re: Extending Wstring and Zstring with UDTs

Done (see above) - KeyPgExtendsZstring → fxm [new page to be finalized] - KeyPgExtendsWstring → fxm [new page to be completed] - CatPgFullIndex → fxm [added 'Extends Zstring' and 'Extends Wstring' keywords] - CatPgFunctIndex → fxm [added 'Extends Zstring' and 'Extends Wstring' keywords] - CatPgUser...
by fxm
Jun 26, 2019 6:42
Forum: Beginners
Topic: ByRef, ByVal, Sub, & Function
Replies: 4
Views: 139

Re: ByRef, ByVal, Sub, & Function

Have you read these documentation pages? - Procedures Overview - Passing Arguments to Procedures (read the paragraph 'Manually passing pointers to by-reference parameters' is optional, because it's just a punctual advanced feature) - Returning Values (read the paragraph 'Manually returning pointers ...
by fxm
Jun 24, 2019 19:42
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1846

Re: Extending Wstring and Zstring with UDTs

1) For EXTENDS ZSTRING ( KeyPgExtendsZstring ), I can initiate the documentation page as the draft proposed below: EXTENDS ZSTRING Specifies a type which inherits a Zstring behavior Syntax Type|Union typename Extends Zstring [, base_typename] ... End Type|Union Description Extends Zstring declares t...
by fxm
Jun 21, 2019 16:03
Forum: General
Topic: Squares
Replies: 6658
Views: 377025

Re: Squares

More general note on the scientific literature

The best book I know about the amazing history of mathematics and physics:
    The Road to Reality: A Complete Guide to the Laws of the Universe
      by Roger Penrose
Downloadable pdf file
by fxm
Jun 19, 2019 19:55
Forum: Documentation
Topic: TYPE - bitfields
Replies: 2
Views: 125

Re: TYPE - bitfields

By defining a get/set property, one can access the different bits through an index: Equivalent code to the one above: Union bitFromUbyte Declare Property b (Byval index As Uinteger, Byval value As Ubyte) Declare Property b (Byval index As Uinteger) As Ubyte ub As Ubyte Type ub0 : 1 As Ubyte ub1 : 1 ...
by fxm
Jun 19, 2019 18:22
Forum: Documentation
Topic: TYPE - bitfields
Replies: 2
Views: 125

Re: TYPE - bitfields

For example: Union bitFromUbyte ub As Ubyte Type ub0 : 1 As Ubyte ub1 : 1 As Ubyte ub2 : 1 As Ubyte ub3 : 1 As Ubyte ub4 : 1 As Ubyte ub5 : 1 As Ubyte ub6 : 1 As Ubyte ub7 : 1 As Ubyte End Type End Union Dim As bitFromUbyte bits With bits .ub = &b10100110 Print Bin(.ub, 8) Print .ub7 & .ub6 ...
by fxm
Jun 19, 2019 9:25
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1846

Re: Extending Wstring and Zstring with UDTs

For 'Type Ustring Extends Zstring' , the added features allow to now support in addition: - 'Strptr' - 'Lset/Rset' - 'Select Case' which were the only incompatible without 'Extends Zstring' . To overload the unary operator Len, since the member data of Ustrin...
by fxm
Jun 19, 2019 7:43
Forum: Linux
Topic: using long double in FB
Replies: 19
Views: 788

Re: using long double in FB

I also realized the typo. I have just corrected it.
Thank you.
by fxm
Jun 19, 2019 5:06
Forum: Linux
Topic: using long double in FB
Replies: 19
Views: 788

Re: using long double in FB

Done: KeyPgZstring → fxm [Added advice when allocating dynamic memory for a Zstring] KeyPgWstring → fxm [Added advice when allocating dynamic memory for a Wstring] KeyPgAllocate → fxm [Added a sentence with reference to pages of Zstring and Wstring to allocate memory to them] KeyPgCallocate → fxm [A...
by fxm
Jun 18, 2019 21:03
Forum: Linux
Topic: using long double in FB
Replies: 19
Views: 788

Re: using long double in FB

For everyone: Do you think it would be nice to add a paragraph about this (rules for allocating dynamic memory) in the Zstring and Wstring pages of the documentation? Proposal of adding: When allocating dynamic memory for a Zstring / Wstring , the safest is to use Callocate (or at worst, to use Allo...
by fxm
Jun 18, 2019 19:24
Forum: Linux
Topic: using long double in FB
Replies: 19
Views: 788

Re: using long double in FB

For all the fixed-length strings, the end of the string is only marked by means of the character 0 (there is no descriptor containing the string length value). When such a string is accessed in read, a terminal character 0 must at least be present inside the allocated memory for the string, otherwis...
by fxm
Jun 18, 2019 17:44
Forum: Linux
Topic: using long double in FB
Replies: 19
Views: 788

Re: using long double in FB

Maybe at least:

Code: Select all

Dim As Zstring Ptr buf=Callocate(256)
Dim As Zstring Ptr frmt=Callocate(16)
by fxm
Jun 18, 2019 4:53
Forum: General
Topic: Calling byval class
Replies: 5
Views: 211

Re: Calling byval class

When you do not specify the passing mode of parameters (without 'Byval' and 'Byref' keywords), they are by default passed by values, except for string and UDT instances which are passed by references, and for arrays which are always passed by references.
by fxm
Jun 17, 2019 21:10
Forum: General
Topic: Calling byval class
Replies: 5
Views: 211

Re: Calling byval class

No, no systematic rule.
The most common is to pass type instances by reference and return them by value.
by fxm
Jun 17, 2019 14:48
Forum: Community Discussion
Topic: Extending Wstring and Zstring with UDTs
Replies: 35
Views: 1846

Re: Extending Wstring and Zstring with UDTs

For 'Type Ustring Extends Zstring' , the added features allow to now support in addition: - 'Strptr' - 'Lset/Rset' - 'Select Case' which were the only incompatible without 'Extends Zstring' . To overload the unary operator Len, since the member data of Ustring...

Go to advanced search