Search found 166 matches

by cbruce
Sep 30, 2018 5:00
Forum: Projects
Topic: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (V3.1.0 June 4, 2023)
Replies: 981
Views: 346838

Re: WinFBE Editor and FreeBASIC Compiler (All-in-One Package) (Updated September 5, 2018)

Hi Paul, Your latest releases have played heck with my editor themes - I can go back to versions like 1.60 and the themes are fine - but with the 1.9+ versions, the colors are all messed up. Any idea what changes you made to the theme format and how I might figure out what's going on without spendin...
by cbruce
Sep 04, 2018 17:31
Forum: Projects
Topic: SparseNet
Replies: 14
Views: 3836

Re: SparseNet

. BasicCoder2, I'm pretty sure it is an attempt at a sparse neural network. dafhi implemented the PCG PRNG function in FB language simply to have control over the type of random numbers that he wanted to utilize in his routines. (He also implemented Xiaolin Wu's line algorithm, etc.). It appears tha...
by cbruce
Jun 17, 2018 20:33
Forum: Beginners
Topic: Error when conditional REDIM()s are in same code block as DIM()
Replies: 4
Views: 1221

Re: Error when conditional REDIM()s are in same code block as DIM()

Ah! So even though example 4 runs without the -exx compiler option... it is just some side effect. With -exx it compiles ok, but it breaks when it runs.
by cbruce
Jun 17, 2018 17:00
Forum: Beginners
Topic: Error when conditional REDIM()s are in same code block as DIM()
Replies: 4
Views: 1221

Re: Error when conditional REDIM()s are in same code block as DIM()

So in the first 3 examples, although I have DIM'ed a dynamic array, DIM()... the compiler sees both REDIM()s (in order) in the same context as the DIM()... and since the second REDIM() is trying to change the arrays dimensions from what the first REDIM() set as a single dimension... we get a compile...
by cbruce
Jun 17, 2018 16:19
Forum: Beginners
Topic: Error when conditional REDIM()s are in same code block as DIM()
Replies: 4
Views: 1221

Error when conditional REDIM()s are in same code block as DIM()

. Wondering why multiple conditional REDIM()s are treated differently when they are in a different code block than their corresponding DIM()... I get a compile error when there are multiple REDIM()s in an IF...ELSE block - and those REDIM()s are in the same code block as their DIM().... whether the ...
by cbruce
Jun 12, 2018 22:23
Forum: Beginners
Topic: Byval myType PTR vs. myType as function parameter?
Replies: 15
Views: 3837

Re: Byval myType PTR vs. myType as function parameter?

. Ok... so Type structures are not implicitly passed by reference in FB. EDIT: Nope! wait a minute... I think MrSwiss says BYVAL, but fxm says BYREF ??? And in my OP... somesub() can change the type instance and the caller sees the changes... and in somesub2(), the caller does not see any changes ma...
by cbruce
Jun 12, 2018 17:36
Forum: Beginners
Topic: Byval myType PTR vs. myType as function parameter?
Replies: 15
Views: 3837

Byval myType PTR vs. myType as function parameter?

. I see cases where people have passed TYPEs as function parameters in one of two different ways. I am wondering why? TYPE type__t DIM x as INTEGER END TYPE DIM mytype as type__t SUB somesub( BYVAL zzz as type__t PTR) ' PTR dereference zzz->x = 42 END SUB SUB somesub2( zzz as type__t) ' DOT derefere...
by cbruce
Jun 08, 2018 22:18
Forum: General
Topic: me: NAMESPACE: STRINGS: INIT: NULL: *issues*
Replies: 16
Views: 2328

Re: me: NAMESPACE: STRINGS: INIT: NULL: *issues*

sancho3, good catch on the nested parentheses. What made you think to try that? Is it documented somewhere to use it for this purpose?

EDIT: FYI - I edited the summary above to add the nested parens and USING information.
by cbruce
Jun 08, 2018 22:07
Forum: General
Topic: me: NAMESPACE: STRINGS: INIT: NULL: *issues*
Replies: 16
Views: 2328

Re: me: NAMESPACE: STRINGS: INIT: NULL: *issues*

.
Also, sancho3, I wonder if the chr(0) issue has to do with the fact that:
CONST
Specifying String as DataType is tolerated but without effect because the resulting type is always a Zstring * Size.

???
EDIT: Oops! - you basically already said that.
.
by cbruce
Jun 08, 2018 22:00
Forum: General
Topic: me: NAMESPACE: STRINGS: INIT: NULL: *issues*
Replies: 16
Views: 2328

Re: me: NAMESPACE: STRINGS: INIT: NULL: *issues*

. That's timely, sancho3... I was just typing a response to fxm about the CONST point when you posted... Cool, fxm... I was able to do it with a CONST... const _WORD_BREAK_CHARS_ as String = _TAB_ + _LF_ + _CR_ + _SPC_ + "!" + _DQ_ + "#$%&" + _SQ_ + "()*+,-./:;<=>?@[\]^_...
by cbruce
Jun 08, 2018 19:41
Forum: General
Topic: me: NAMESPACE: STRINGS: INIT: NULL: *issues*
Replies: 16
Views: 2328

Re: me: NAMESPACE: STRINGS: INIT: NULL: *issues*

. Here's a summary for anyone that sees this thread... EDIT: added #4. EDIT: added nested parens to #3 thanks to sancho3 - (because I didn't catch it when fxm said it [smile]). EDIT: added existing bug report reference to #3 thanks to fxm ' NAMESPACE related STRING variable issues: ' ' 1. Variable i...
by cbruce
Jun 08, 2018 19:29
Forum: General
Topic: me: NAMESPACE: STRINGS: INIT: NULL: *issues*
Replies: 16
Views: 2328

Re: me: NAMESPACE: STRINGS: INIT: NULL: *issues*

Thanks, MrSwiss. I only asked that question since I couldn't get the program to compile when I was trying to access the variable outside the namespace. But as fxm pointed out, it was just a problem with the LEN() function against the variable from the namespace. I had poured over the manual (look at...
by cbruce
Jun 08, 2018 19:14
Forum: General
Topic: me: NAMESPACE: STRINGS: INIT: NULL: *issues*
Replies: 16
Views: 2328

Re: me: NAMESPACE: STRINGS: INIT: NULL: *issues*

Also under NAMESPACE, the fact that it *requires* you to use the namespace identifier to access the namespace's variables.

EDIT: Plus the fact that... No strings in a namespace can be initialized with a NULL in the literal.
by cbruce
Jun 08, 2018 19:04
Forum: General
Topic: me: NAMESPACE: STRINGS: INIT: NULL: *issues*
Replies: 16
Views: 2328

Re: me: NAMESPACE: STRINGS: INIT: NULL: *issues*

Aargh!... Thanks! You are correct. When I was first having problems defining the variables, I was using the namespace id when trying to print the variable itself. But I eventually just got down to using the PRINT LEN() that I showed in the test rig. So it's just the LEN() and associated functions. E...
by cbruce
Jun 08, 2018 18:40
Forum: General
Topic: me: NAMESPACE: STRINGS: INIT: NULL: *issues*
Replies: 16
Views: 2328

Re: me: NAMESPACE: STRINGS: INIT: NULL: *issues*

Thanks fxm, but it wasn't just len(). When I tried to print the variable itself, or assign it to another variable, etc. The compiler gave that: error 42: Variable not declared, _WORD_BREAK_CHARS_ in ... (whatever I was trying to use it for) ... It could not see the variable defined in the namespace ...