Search found 3042 matches

by MrSwiss
Jul 23, 2014 17:31
Forum: Beginners
Topic: Time display
Replies: 20
Views: 1669

Re: Time display

Hello all, using MichaelW's threading CODE (with semaphore) and replacing his test CODE with my DEMO CODE below, shows the independant speed of the two threads, different colors, using toggle switches etc. ''------------------------------------ '' MAIN routine DEMO, inserted below: CreateThread(0, 0...
by MrSwiss
Jul 19, 2014 14:35
Forum: Beginners
Topic: Time display
Replies: 20
Views: 1669

Re: Time display

@MichaelW,

thank you for the clarification. I just think that, especially in 'Beginners', everything has to be:
A-OK in order to: NOT starting to introduce any missanderstandings. No offence intended ... ;-)

regards MrSwiss
by MrSwiss
Jul 19, 2014 10:46
Forum: Beginners
Topic: Time display
Replies: 20
Views: 1669

Re: Time display

@MichaelW,

what I don't understand is the following:

Code: Select all

dim shared as ulongint dueTime
...
...
dueTime = -10000000

Declaration says 'unsigned 64bit integer', however:
assignment is a signed 'int' type ?? Isn't this wrong, I'd declare it (dueTime) as LongInt ??
by MrSwiss
Jun 27, 2014 13:07
Forum: Documentation
Topic: #libpath description
Replies: 4
Views: 1159

Re: #libpath description

Hi all, I think Vanya is right, the #libpath seems to be relative to the source-file 'whatever.bas'. Because: #libpath "C:\FreeBASIC\inc\" with a commandline like (called from: C:\FreeBASIC\ folder): fbc -dll C:\FreeBASIC\Projects\PrjName.bas ... works but: without the #libpath statement i...
by MrSwiss
Jun 15, 2014 15:11
Forum: Hardware Interfaces / Communication
Topic: Com4: Problem
Replies: 6
Views: 2182

Re: Com4: Problem

@Dinosaur, having had a look a couple of months ago, at the very same piece of HW and seeing the forum posts there ... I've decided to NOT "make the BETA-Tester" for the product. I think the producer will have to "deburr and polish" this product before it may become someting &quo...
by MrSwiss
Jun 13, 2014 0:15
Forum: General
Topic: [solved] clearing sign bit with 'And=' Func.
Replies: 9
Views: 869

Re: clearing sign bit with 'And=' Func.

Thanks dkl, this sorts the question out. The speed question remains. OK, did it myself since there wasn't any conclusive answer, as follows: ' math's speed test, negating a Long 1 billion times (1 x 10 E0009) Dim As Long iVal = -32, minLoop = 1, maxLoop = 1000000000 Dim As Double tStart, tStop, tmpT...
by MrSwiss
Jun 12, 2014 23:31
Forum: General
Topic: [solved] clearing sign bit with 'And=' Func.
Replies: 9
Views: 869

Re: clearing sign bit with 'And=' Func.

@Merick, no the main purpose here is speeding up code of the math (as in the first post: iVal *= -1, does the trick) as well as dkl's iVal = -iVal does. Before that code, I need the negative Long for the "If iVal < 0 Then" comparison. @dkl, tested your code " iVal = -iVal ", work...
by MrSwiss
Jun 12, 2014 19:46
Forum: General
Topic: [solved] clearing sign bit with 'And=' Func.
Replies: 9
Views: 869

Re: clearing sign bit with 'And=' Func.

11111111111111111111111111100000 -32 test value If you're REALLY having above (and the fault is not in the print(bin())-statement), then as far as I understand, your problems are far larger than expected, because: 1000'0000-0000'0000-0000'0000-0010'0000 = -32 (formating used for easy reading: ' =ni...
by MrSwiss
Jun 12, 2014 18:55
Forum: General
Topic: [solved] clearing sign bit with 'And=' Func.
Replies: 9
Views: 869

Re: clearing sign bit with 'And=' Func.

Well, if you wanted to negate a 32bit integer variable, then you can just use the unary - (minus) operator (masking out the sign bit isn't enough): @dkl, you just completely lost me there ... Please explain that "isn't enough" in more detail! It is, as far as I'm aware, the prefered metho...
by MrSwiss
Jun 12, 2014 14:47
Forum: General
Topic: [solved] clearing sign bit with 'And=' Func.
Replies: 9
Views: 869

[solved] clearing sign bit with 'And=' Func.

Hello all, whilst trying to improve my code for speed, I think I've found a problem: Dim as Long iVal = Fix(input1) '' input1 is defined as Double Ptr '' I just need the Int part without any undesired rounding, max size is 86'399 (seconds per day, 86400 beeing 0 S + 1 day) If iVal < 0 Then iVal *= -...
by MrSwiss
Jun 05, 2014 12:25
Forum: Community Discussion
Topic: The new website
Replies: 150
Views: 20325

Re: The new website

... (too good to be true!). Maybe freebasic.net is no longer on this server? This is but one of the possible reasons: Another one might be that the Hosting-Providers capacity (the 'pipeline(s)' to the Internet) are at 100% load all the Time. This could explain that 'internal' Server-Monitoring show...
by MrSwiss
Jun 05, 2014 10:39
Forum: Community Discussion
Topic: The new website
Replies: 150
Views: 20325

Re: The new website

I think it's the Server/Connection ...
The Monitoring seems to be 'crappy':
NOT the Monitoring Application, but the IMPLEMENTATION!

Who knows WHAT they're monitoring ???
by MrSwiss
Jun 04, 2014 20:50
Forum: Community Discussion
Topic: The new website
Replies: 150
Views: 20325

Re: The new website

The same here from Switzerland, it wendt slower and slower all the time, regardless what real time monitoring says (all OK), but NO ACCESS to Forum. Seems that the Server is breaking down completely. Greets MrSwiss [edit]Had a typoo, wanted to correct, took ca. 15Min. to get connection again!![/edit]
by MrSwiss
Jun 01, 2014 16:17
Forum: Documentation
Topic: 64-bit Integer
Replies: 8
Views: 2862

Re: 64-bit Integer

So how to define the 'future' 64bit constant?
- as LongInt (makes some sense to me, since it is defined as 64bit)
- as Integer (reengineer it to 64bit? ... recreate confusion!)
How to go from here, that's the question.
by MrSwiss
Jun 01, 2014 14:00
Forum: Documentation
Topic: 64-bit Integer
Replies: 8
Views: 2862

Re: 64-bit Integer

An "int" has allways the same size as an pointer of the target OS 8,16,32, 64 ... bit Only the long data type is allways 4 bytes FB should follow these unwritten law also. Joshy Those 2 lines solved an age old mystery of mine: "How the heck can something be called 'DEFINED' and still...

Go to advanced search