Search found 3037 matches

by MrSwiss
May 24, 2019 15:05
Forum: General
Topic: Len() can't be 'overloaded'
Replies: 14
Views: 459

Re: Len() can't be 'overloaded'

Operator len() can be overloaded; a non-member unary operator declared/defined outside of the type in the global namespace. Thanks, that clears the fog. I think generally speaking, its better to state "what it is", instead of stating "what it isn't". Seems far easier to understa...
by MrSwiss
May 24, 2019 13:47
Forum: General
Topic: Len() can't be 'overloaded'
Replies: 14
Views: 459

Re: Len() can't be 'overloaded'

@coderJeff, thanks for your clarifications. The static Operator, seems to be, what I'm looking for. However, the expectation on the 'to be obtained result ' is different than yours: ... Dim As T x Print Len( x ) ' <---- no type prefix This seems to mean, that your question: Maybe it should be added ...
by MrSwiss
May 23, 2019 20:56
Forum: General
Topic: Len() can't be 'overloaded'
Replies: 14
Views: 459

Re: Len() can't be 'overloaded'

@srvaldez,

please, read it all, again ...

I'm not a fan, of repeating myself. ;-)
by MrSwiss
May 23, 2019 20:22
Forum: General
Topic: Len() can't be 'overloaded'
Replies: 14
Views: 459

Re: Len() can't be 'overloaded'

Sorry, the error # was too low (by 10) ...
FbTemp.bas(33) error 153: Operator cannot be a member function (TODO), before '(' in 'Declare Operator Len() As ULong'
FbTemp.bas(33) error 153: Operator cannot be a member function (TODO), before '(' in 'Declare Operator Len(ByRef As zstr_t) As ULong'
by MrSwiss
May 23, 2019 18:45
Forum: Beginners
Topic: File i/o question.
Replies: 3
Views: 287

Re: File i/o question.

First how exactly do you define a "match"? E.g. all three elements are of equal content? In principle, there are no such "specific" language constructs in FB. (unlike, e.g. VB.NET) The way to deal with such "specifications", should be split into: 1) load everything (fro...
by MrSwiss
May 23, 2019 18:16
Forum: General
Topic: Len() can't be 'overloaded'
Replies: 14
Views: 459

Re: Len() can't be 'overloaded'

1) Current behaviour doesn't allow, a differing implementation of String . 2) Len() is a crucial part of that. 3) Unary / Binary / Ternary Operators in types, are in principle possible. (e.g. + or & overloaded concatenation Operators (unary)) 4) The received Error: 143, clearly states (T...
by MrSwiss
May 23, 2019 15:27
Forum: General
Topic: Len() can't be 'overloaded'
Replies: 14
Views: 459

Re: Len() can't be 'overloaded'

As written: Operator Len() ... (first noticed). (the return type of a function is not taken into account for overloading) does NOT apply there. Operators can differentiate on return type only (Operator specific behaviour). It's not really helpful, to concentrate on "heavily simplified code"...
by MrSwiss
May 23, 2019 13:29
Forum: General
Topic: Len() can't be 'overloaded'
Replies: 14
Views: 459

Len() can't be 'overloaded'

I've noticed at first, when trying a customized string-type, which was to contain a overloaded Operator Len() (unary operator overload) as per description in doc. It gave a Error, in which it was stated, that this is on the TODO list. In the light of the recent discussion on WString (making it dynam...
by MrSwiss
May 21, 2019 10:24
Forum: General
Topic: Resize a control dynamically in runtime using the mouse
Replies: 4
Views: 185

Re: Resize a control dynamically in runtime using the mouse

Yes, WIN-API code can do it (but, the code is no longer multi OS).

If multi OS is the intention, you'll have to use a external lib.
by MrSwiss
May 21, 2019 0:05
Forum: General
Topic: How do you interoperate with other applications using double-precision floating-point?
Replies: 15
Views: 362

Re: How do you interoperate with other applications using double-precision floating-point?

Seems that you are somewhat confused, since a Double (FB or C, ...) is a defined quantity, in terms of being 64 bit / 53 bit mantissa (52 + 1 implied), as defined by: IEEE 754, binary64 . (in FB/C called: Double) Therefore, Double in FB = Double in any other language, the Name can be different (the ...
by MrSwiss
May 17, 2019 19:18
Forum: Community Discussion
Topic: New array features
Replies: 82
Views: 3558

Re: New array features

I tend to agree with speedfixer, use option #1. (preferred) Also, just providing ' primitives ' like required Macro's and such, should do. Extending the 'primitives' according to the ' job at hand ', by the application developer, at the sole discretion of the programmer in question ... I'd strictly ...
by MrSwiss
May 11, 2019 13:37
Forum: General
Topic: Problem writing 8GB array to disk
Replies: 25
Views: 721

Re: Problem writing 8GB array to disk

@dodicat,

file is small: 2.53 MB only, otherwise, all okay. (FBC 64, 1.06.0, Win standalone)
by MrSwiss
May 11, 2019 11:48
Forum: General
Topic: Typeof (pointer value) ?
Replies: 8
Views: 330

Re: Typeof (pointer value) ?

This feature enabled, my life is easier ;) What makes you think so? I don't see any reason for it. 'Var bar = 67.2f ' forced to: Single Var bar = 67.2 ' default Double #Print TypeOf(bar) ' see: compiler output Print bar : Sleep TypeOf() returns the data-type, as string at compile time.
by MrSwiss
May 05, 2019 18:49
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 871

Re: SWAP keyword

Thank you.
by MrSwiss
May 05, 2019 18:34
Forum: Documentation
Topic: SWAP keyword
Replies: 35
Views: 871

Re: SWAP keyword

When the data are referenced by a pointer, alone or within a descriptive structure (a UDT, for example), it is usually best to only SWAP only exchange s the values of the pointers or the contents of the descriptive structures without accessing data themselves. This part needs a reformulation, a sta...

Go to advanced search