Search found 491 matches

by pestery
Mar 17, 2013 9:03
Forum: Projects
Topic: FBMATH v0.55 problem
Replies: 10
Views: 1320

Re: FBMATH v0.55 problem

I don't actually use fbmath, but the problem you had sparked my interest, probably the mention of "cryptlib.bi", which I use. Anyway, glad to help :-)
by pestery
Mar 14, 2013 4:43
Forum: Projects
Topic: FBMATH v0.55 problem
Replies: 10
Views: 1320

Re: FBMATH v0.55 problem

I have found the problem! The exact problem. Also, the problem looks to be windows only and may not occur under linux, though I haven't tested it. In the FB runtime library, in the section that deals with random numbers (maths_rnd.c) there is a function called hGetRealRndNumber. This function contai...
by pestery
Mar 12, 2013 12:07
Forum: General
Topic: Duplicated definition in operator =
Replies: 15
Views: 1260

Re: Duplicated definition in operator =

Ha, I overlooked that. Your correct Cherry.
by pestery
Mar 12, 2013 10:05
Forum: General
Topic: Duplicated definition in operator =
Replies: 15
Views: 1260

Re: Duplicated definition in operator =

Well, a String datatype contains a ZString Ptr which would have it's data compared, so yes they are the same. More or less.
by pestery
Mar 11, 2013 9:22
Forum: Projects
Topic: FBMATH v0.55 problem
Replies: 10
Views: 1320

Re: FBMATH v0.55 problem

From your comment it looks like there is a problem in the FB library (libfb.a), in the section used to generate random numbers. I'd guess the function/s are offloading the work to some encryption library random number generator, but I don't think its cryptlib. Probably the windows encryption library...
by pestery
Mar 11, 2013 8:27
Forum: Beginners
Topic: INTEGER and LONG Variable Specification
Replies: 18
Views: 1975

Re: INTEGER and LONG Variable Specification

One quick extra point. Either Long or Integer will have to be 64bit on a 64bit build (a native size datatype) and the current documentation suggests that it should be Long, but because FB has been 32bit only it probably doesn't matter which is picked. Previously Integer = Long = Pointer was a valid ...
by pestery
Mar 11, 2013 4:24
Forum: Beginners
Topic: INTEGER and LONG Variable Specification
Replies: 18
Views: 1975

Re: INTEGER and LONG Variable Specification

That's an interesting idea, switching Long and Integer. Although it might cause problems because in the documentation Integer is listed as always 32 bits, so if someone has done something like this somewhere in their code then they're in for a lot of trouble. Dim As Any Ptr buffer ' Some buffer that...
by pestery
Mar 06, 2013 13:06
Forum: General
Topic: Found bug in GCC emitter
Replies: 24
Views: 2630

Re: Found bug in GCC emitter

No, your version does compile. But I managed to make it fail in the same way as before by re-adding some code, and removing as much other code as I could. The result is about the same length of code as your example TJF. It looks like the compiler is generating the same C line twice, 20 lines apart i...
by pestery
Mar 06, 2013 12:41
Forum: General
Topic: Found bug in GCC emitter
Replies: 24
Views: 2630

Re: Found bug in GCC emitter

Ah yes, sorry, I forgot to mention the OS, I'm running Win7 64bit... not that the 64 bit matters :P

Also, the GCC compiler I'm using is the MinGW32 I think. I stole it from CodeBlocks, the version that comes with the complier bundled in.
by pestery
Mar 06, 2013 6:57
Forum: General
Topic: Found bug in GCC emitter
Replies: 24
Views: 2630

Re: Found bug in GCC emitter

Well, I'm back again with another possible bug in the GCC emitter. I was using gtk-2.24.bi (via gtk.bi) and there is something there that the GCC can't handle, although it works fine in GAS. It appears that the same temporary variable is being defined twice within the same scope, and GCC doesn't lik...
by pestery
Mar 03, 2013 8:28
Forum: Community Discussion
Topic: Errors in the examples to the compiler 0.24
Replies: 43
Views: 4225

Re: Errors in the examples to the compiler 0.24

About the issue with the GTK+ examples, sounds like the import libraries may be wrong? Perhaps it'll work to use their official win32 binaries. You can probably also delete the GTK+ import libraries from lib/win32/ and link directly to the GTK+ DLLs. I just trying to use GTK again and got the "...
by pestery
Mar 01, 2013 12:49
Forum: Tips and Tricks
Topic: Advanced Search StringInStr
Replies: 7
Views: 1604

Re: Advanced Search StringInStr

Fair enough :P
by pestery
Mar 01, 2013 1:12
Forum: Tips and Tricks
Topic: Advanced Search StringInStr
Replies: 7
Views: 1604

Re: Advanced Search StringInStr

Couldn't you just use InStr and LCase (or UCase)? Well, unless the text was very long and you didn't want to LCase the whole thing.

Code: Select all

result = InStr(LCase(maintext), LCase(search))
result = InStr(start, LCase(maintext), LCase(search))
by pestery
Feb 16, 2013 13:07
Forum: General
Topic: What causes threads to lock up?
Replies: 25
Views: 1539

Re: What causes threads to lock up?

Fre() shows the amount of available (free) RAM, in bytes. Just a quick demo. Dim As UByte Ptr buffer(1 To 100) Dim As UInteger free_memory = Fre() Print Using "Free memory available: #,###,###,###.# bytes (#,###.# MB) "; free_memory; (free_memory / (1024 ^ 2)) For i As Integer = LBound(buf...
by pestery
Feb 13, 2013 14:01
Forum: Tips and Tricks
Topic: Simple Chat
Replies: 2
Views: 704

Re: Simple Chat

Here's another chat program, a bit more advanced but still reasonably simple. Link.

Go to advanced search