Search found 166 matches

by cbruce
Mar 30, 2018 19:51
Forum: General
Topic: Division issues with FB ULONGINTs?
Replies: 7
Views: 955

Re: Division issues with FB ULONGINTs?

Great information folks! Now I can get back to work on the conversion and see if I can finally get something useful to post.
by cbruce
Mar 30, 2018 17:18
Forum: General
Topic: Division issues with FB ULONGINTs?
Replies: 7
Views: 955

Re: Division issues with FB ULONGINTs?

Thanks, Josep... And I'm a dummy for not talking about using "\" instead of INT(x/?). I was just so irritated when I finally figured out that it appears to me that C++ "/" is actually using floor() internally when evaluating ULONGINT division that my mind fell back to more of a m...
by cbruce
Mar 30, 2018 16:31
Forum: General
Topic: Division issues with FB ULONGINTs?
Replies: 7
Views: 955

Division issues with FB ULONGINTs?

Is there a known issue with FB's division "/" operator and ULONGINT variables? My environment: FreeBASIC Compiler - Version 1.06.0 (11-29-2017), built for win64 (64bit) Windows 10 64-bit Division, "/", results are hit or miss - no consistency. INT(x / ?), (the floor function), al...
by cbruce
Feb 17, 2018 3:51
Forum: General
Topic: func parameter - c struct vs fb type?
Replies: 1
Views: 390

func parameter - c struct vs fb type?

Given this C struct and function call... struct my_c_struct { uint64_t elem_1; uint64_t elem_2; }; my_c_struct xxx; void my_c_func(struct my_c_struct* xxx) Is one of these two possible conversions to FB the correct one? type my_fb_type elem_1 as ulongint elem_2 as ulongint end type DIM xxx as my_fb_...
by cbruce
Feb 16, 2018 22:54
Forum: General
Topic: Can I generate stand-alone C source code?
Replies: 3
Views: 610

Re: Can I generate stand-alone C source code?

Thanks dodicat... but everything except your main() just gave me a headache! [smile]

I'll go check out the BCX Basic to see what it generates.
by cbruce
Feb 16, 2018 18:56
Forum: General
Topic: Can I generate stand-alone C source code?
Replies: 3
Views: 610

Can I generate stand-alone C source code?

Is there an option in FreeBASIC to generate stand-alone console mode C source code that could be compiled with Visual Studio, etc? I've used the [-gen gcc] option, but I see by the naming conventions that the dependencies in that generated code are all FB includes/libs, (which are not included in th...
by cbruce
Jun 06, 2017 13:37
Forum: General
Topic: Has anyone ported the PCG PRNG to FreeBASIC
Replies: 35
Views: 5356

Re: Has anyone ported the PCG PRNG to FreeBASIC

Wow! Thanks, srvaldez!

I'll look at it tonight.

CBruce
by cbruce
Jun 04, 2017 21:56
Forum: General
Topic: Has anyone ported the PCG PRNG to FreeBASIC
Replies: 35
Views: 5356

Re: Has anyone ported the PCG PRNG to FreeBASIC

Thanks, David. The fact that you are impressed, tells me I might be headed down the right road. I'll be working on this next week in my evenings. and I'll keep you updated. By the way, if you have time, take a look at her whitepaper ... It is actually the best read I have ever seen on RNGs. BEH
by cbruce
Jun 04, 2017 15:33
Forum: General
Topic: Has anyone ported the PCG PRNG to FreeBASIC
Replies: 35
Views: 5356

Re: Has anyone ported the PCG PRNG to FreeBASIC

THANKS for converting the basic version counting_pine!!! I should be able to convert the full version by referencing this one. Now I get to go play!!! CBruce FYI counting_pine .... From her whitepaper, the simple description of the Ms. O'Neill's algorithm: The key idea is to pass the output of a fas...
by cbruce
Jun 03, 2017 22:55
Forum: General
Topic: Has anyone ported the PCG PRNG to FreeBASIC
Replies: 35
Views: 5356

Re: Has anyone ported the PCG PRNG to FreeBASIC

Hi MrSwiss, Melissa O'Neill has created an amazing family of PRNG's and CPRNG's, written in pure C99 and/or C++ (no ASM), that are faster and have longer periods of non-repeating sequences than any other RNG out there. These include PRNGs that can provide multiple non-collision streams from a single...
by cbruce
Jun 03, 2017 20:42
Forum: General
Topic: Has anyone ported the PCG PRNG to FreeBASIC
Replies: 35
Views: 5356

Has anyone ported the PCG PRNG to FreeBASIC

Has anyone ported the PCG PRNG from C99 to a version for FreeBASIC that they would like to share?

PCG, A Family of Better Random Number Generators
http://www.pcg-random.org/

Not really a C guy ... so wanted to know before I give it a try.

Thanks,
CBruce
by cbruce
Sep 18, 2012 23:33
Forum: Community Discussion
Topic: Fuzed DS Beta. A puzzle Platformer
Replies: 5
Views: 1305

Re: Fuzed DS Beta. A puzzle Platformer

This was supposed to be in FB. But until it gets virtual class support, I don't think I'll make something this big in FB. The tools I used to make this game is FB all the way though. Just curious about wanting virtual class support: Is it because of ambiguous multiple-inheritence? Or because you ta...
by cbruce
Aug 08, 2010 17:32
Forum: Linux
Topic: Ubuntu Linux console, special characters and mouse... how?
Replies: 5
Views: 3397

Linux console text mode interface lib = Newt

Cas, I don't know if you are still working on this, but the Newt library is what most people use when they need pure, text mode dialogs for Linux console interface - it's used for installers, etc.: http://en.wikipedia.org/wiki/Newt_%28programming_library%29 I've never used it with FreeBASIC - but if...
by cbruce
Sep 19, 2008 2:23
Forum: Projects
Topic: FbEdit, new IDE for FreeBASIC written in FreeBASIC
Replies: 964
Views: 241821

OutputDebugString() problem

Hi KetilO - First, thanks for all the work. This is THE most useful project in the forums!!! I had a problem with the new debug "feature" that pops up message boxes with the output text from calls to OutputDebugString(). I did a [Debug] [Continue] at one point to get the results from the r...
by cbruce
May 15, 2008 3:57
Forum: General
Topic: Tools to aid in converting C to FreeBASIC
Replies: 5
Views: 2534

Hi cha0s - Yeah, I code in both FreeBASIC and PowerBASIC - (The last time I coded in C for a living was 11 years ago). And I occassionally run into C programs that I want to convert completely to Basic. This is the best way that I've found, so far, to be able to dig into these C programs and figure ...