Search found 136 matches

by cbruce
Apr 10, 2018 19:39
Forum: Beginners
Topic: 32/64 bit compiler issue
Replies: 10
Views: 1251

Re: 32/64 bit compiler issue

Ok... *NOT* A LINE CONTINUATION PARSING ERROR ! It's the number of static elements in an array assignment ! 26170 static elements *MAX*... if using DIM( ... ) optional method. 26169 static elements *MAX*... if using DIM( nnnn ) hardcoded method. I tried scenarios with 1 element per line - some multi...
by cbruce
Apr 10, 2018 15:03
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1406

Re: DOUBLE's fractional digits to ULONGINT ?

Apologies jj2007... my comment about "errors" was not in relation to the purity of mathematics - but in relation to the purpose I was going to put the results to. As my example from a couple of posts ago explained: Example: If I was looking for a max range double of 0.6804801726248115 - an...
by cbruce
Apr 10, 2018 0:09
Forum: General
Topic: Random PEEK()s ?
Replies: 2
Views: 368

Random PEEK()s ?

Brain... hurt.... Just playing around and thought I would take a look at what is in my user memory space... but simple PEEK abends (abnormal end... dies a horrible death... quits running and Windows gives an error message... makes my brain hurt). It is so simple, but can't remember what I am doing a...
by cbruce
Apr 09, 2018 23:32
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1406

Re: DOUBLE's fractional digits to ULONGINT ?

Yep, Integer... thanks... but paul doe already straightened me out on that a few posts above.

I was just pointing out the error in the direction of the on-going conversation.
by cbruce
Apr 09, 2018 21:58
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1406

Re: DOUBLE's fractional digits to ULONGINT ?

Although I don't need this anymore, you are missing one of the errors that I found in this attempt to multiply a double by a ulongint constant to get an exact representation of the doubles fractional digits as a ulongint value. The constant must be the correct value in relation to the length of the ...
by cbruce
Apr 09, 2018 4:20
Forum: Beginners
Topic: Faster string copying/building
Replies: 12
Views: 1114

Re: Faster string copying/building

Iczer, I believe you are looking for a String Builder function. In regular string concatenation, you are utilizing small buffers and having to allocate memory and move small fragments around a LOT. That is where performance becomes an issue when you have many strings to concatenate. String Builders ...
by cbruce
Apr 09, 2018 4:02
Forum: Beginners
Topic: 32/64 bit compiler issue
Replies: 10
Views: 1251

Re: 32/64 bit compiler issue

Definitely line continuation parsing issue. I combined 30 of the lines... no error. Added 10 continued lines at the bottom, still no error.

If it works for you sero, just use longer lines.
by cbruce
Apr 09, 2018 2:38
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1406

Re: DOUBLE's fractional digits to ULONGINT ?

Perfect Paul! With that, I only need to convert my internal rng's ulongint result to a double and shove it into the equation. Simple and fast. A sliding range window... obvious once you see it. [smile]
Thanks!
by cbruce
Apr 08, 2018 23:44
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1406

Re: DOUBLE's fractional digits to ULONGINT ?

I want to be able to generate a specified range of random doubles - not just the [0 to 1) range that a standard RND() that generates doubles does - but a range like [0.283834 to 0.9875922245]. And I haven't been able to figure out how to do that using only doubles. The only way I could think of to d...
by cbruce
Apr 08, 2018 22:20
Forum: General
Topic: DOUBLE's fractional digits to ULONGINT ?
Replies: 20
Views: 1406

DOUBLE's fractional digits to ULONGINT ?

Is there a math way to exactly translate a DOUBLE's fractional digits to a ULONGINT? NOTE: I do not want to convert a DOUBLE to a ULONGINT !!! I want to translate a DOUBLE's fractional digits to a ULONGINT. e.g. 0.876399937 ==> 876399937ull I can get there with an intermediate STRING assignment - bu...
by cbruce
Apr 06, 2018 23:23
Forum: General
Topic: (2^64) - 1 = 0 but numeric literal is ok?
Replies: 7
Views: 443

Re: (2^64) - 1 = 0 but numeric literal is ok?

Darn... thanks, @dodicat. I probably never would have thought to RTM about the '^' operator - it just seems so obvious what it is supposed to do... "^ works with double float numbers only, operands of other types will be converted into double before performing the exponentiation" I had tri...
by cbruce
Apr 06, 2018 21:59
Forum: General
Topic: (2^64) - 1 = 0 but numeric literal is ok?
Replies: 7
Views: 443

(2^64) - 1 = 0 but numeric literal is ok?

Any idea why the numeric literal is acceptable where the calculation is not? ' Prints 0 const X as ulongint = (2^64) - 1ull print "X = "; X ' Prints 18446744073709551615 const Z as ulongint = 18446744073709551615ull ' same as (2^64) - 1ull ... right? print "Z = "; Z
by cbruce
Apr 02, 2018 14:45
Forum: General
Topic: DYNAMICBASE option for Address Space Layout Randomization (ASLR)
Replies: 4
Views: 731

Re: DYNAMICBASE option for Address Space Layout Randomization (ASLR)

Without any ASLR, relocatable, -pie position-independent type options added to the fbc.exe command line... using Process Explorer, ASLR shows "Disabled" for myapp.exe. After adding this option to fbc.exe command line... (linker option) -Wl -dynamicbase ... myapp.exe ASLR shows "Enable...
by cbruce
Apr 02, 2018 4:10
Forum: General
Topic: DYNAMICBASE option for Address Space Layout Randomization (ASLR)
Replies: 4
Views: 731

Re: DYNAMICBASE option for Address Space Layout Randomization (ASLR)

Ok, thanks to caseih I got headed down the right path to enable ASLR. I needed this option... -Wl -dynamicbase After compiling I went into Process Explorer, launched the properties for my app and can see that ASLR is enabled... sort of... Address Space Load Randomization (ASLR) shows as "Enable...
by cbruce
Apr 01, 2018 22:53
Forum: General
Topic: DYNAMICBASE option for Address Space Layout Randomization (ASLR)
Replies: 4
Views: 731

DYNAMICBASE option for Address Space Layout Randomization (ASLR)

I would like to enable Address Space Layout Randomization (ASLR) for my Windows FB program - (ASLR is the default for programs compiled on Linux). This requires the Windows /DYNAMICBASE option being added to the link process. I've tried the Compiler Option -Wl to pass options to linker... -Wl /DYNAM...

Go to advanced search