Search found 1349 matches

by badidea
May 25, 2019 21:08
Forum: General
Topic: Change string to ordered index ?
Replies: 22
Views: 710

Re: Change string to ordered index ?

Something like this? type data_type dim as string text dim as integer count declare operator cast () as string end type operator data_type.cast () as string return str(count) + " x " + text end operator '------------------------------------------------------------------------------- type s...
by badidea
May 23, 2019 22:34
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 41
Views: 2177

Re: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)

I can post the sound, if you would like to experiment with it. I'll post the whole program eventually, but it isn't really a game yet... It isn't that impressive right now, and you can't even die yet. :p I can try something, but not in the next 16 hours (sleep and work first). I once started some c...
by badidea
May 23, 2019 21:58
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 41
Views: 2177

Re: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)

Some thoughts on the sound looping question... If the last sample value of the sound does not line up with the first sample value of the sound, I would expect some 'pop'. I was playing a bit with this in the ALSA topic: https://freebasic.net/forum/viewtopic.php?f=5&t=26821&hilit=alsa#p248912...
by badidea
May 23, 2019 21:30
Forum: Libraries
Topic: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)
Replies: 41
Views: 2177

Re: fbsound 1.1 (dynamic) Windows/Linux 32 and 64-bit (wav mp3 ogg mod it xm s3m)

Sorry to be a pest, but I have another question. Is there an utility to determine if a sound is currently playing? I made this routine (after some advice somewhere in this topic): function my_fbs_Sound_playing(hSound as integer) as boolean dim as integer nLoops fbs_Get_SoundLoops(hSound, @nLoops) i...
by badidea
May 23, 2019 21:04
Forum: General
Topic: Memory access ? (Solved on 64 bit distro)
Replies: 11
Views: 398

Re: Memory access ?

On my (linux) laptop with 8 GB memory, this code runs fine: const as longint KB = 1024 const as longint MB = KB * 1024 const as longint GB = MB * 1024 const as longint BLOCK_SIZE = 4 * GB Print "Free memory: "; fre() \ MB; " megabytes" print print "allocating bytes" dim...
by badidea
May 22, 2019 22:34
Forum: Community Discussion
Topic: Wiindows 10
Replies: 24
Views: 1201

Re: Wiindows 10

dodicat wrote:Might as well be on 1809 goatskin for all the good it is.

Code: Select all

...

If that code is meant to run on Linux, then use double for timer variables :-p
by badidea
May 22, 2019 22:21
Forum: Windows
Topic: How to use correct Common Shared syntax?
Replies: 17
Views: 546

Re: How to use correct Common Shared syntax?

I see your point, the example on this page (https://freebasic.net/wiki/wikka.php?wakka=KeyPgCommon) is unclear. Not sure myself how it should work.
by badidea
May 22, 2019 22:14
Forum: Projects
Topic: Creating (scientific) plots via gnuplot
Replies: 68
Views: 2166

Re: Creating (scientific) plots via gnuplot

I read that in gnuplot 5.2 arrays have been added. This way I could create one script file with the data included. E.g., script file: ... set title 'U/I plot' ... array I[10] = [120, 125, 122, 119, 134, 138, 141, 159, 162, 178] array U1[10] = [250, 210, 180, 155, 140, 125, 110, 100, 90, 80] array U2...
by badidea
May 22, 2019 21:44
Forum: Windows
Topic: How to use correct Common Shared syntax?
Replies: 17
Views: 546

Re: How to use correct Common Shared syntax?

namespace would be a good to use here? To keep thing orderly?
E.g.:

Code: Select all

namespace mymath

   dim shared ival as long

   function mytest(inval as long) as long
      return inval * ival
   end function

end namespace

Code: Select all

#include "mymath.bas"

mymath.ival = 10
print mymath.mytest(23)
sleep
by badidea
May 22, 2019 17:57
Forum: Community Discussion
Topic: Wiindows 10
Replies: 24
Views: 1201

Re: Wi<s>i</s>ndows 10

If I extrapolate, then in 2023 the time to update will be longer then the time between updates :-)
by badidea
May 22, 2019 17:45
Forum: Projects
Topic: windows Multi-language Editor ( English;French;Spanish)
Replies: 71
Views: 17714

Re: windows Multi-language Editor ( English;French;Spanish)

/'
FreeBASIC multi-line comment
'/
by badidea
May 21, 2019 22:36
Forum: Tips and Tricks
Topic: Flush file buffer immediately - write on HDD
Replies: 3
Views: 295

Re: Flush file buffer immediately - write on HDD

Is the double cast to "file ptr" a typo or intentional?
cast(FILE ptr, Cast( FILE Ptr, ... ) )
by badidea
May 21, 2019 21:51
Forum: Projects
Topic: GooData: diagrams for screen / printer / files
Replies: 17
Views: 1874

Re: GooData: diagrams for screen / printer / files

No old 32 bit netbook in any corner? Actually, I do. But I fear that I will spend a whole evening fiddling with that thing and its tiny screen with 2 possible outcomes: A) It works on 32-bit, now what? B) It does not work. One evening wasted. Also probably more convenient to install a 32-bit Linux ...
by badidea
May 21, 2019 20:41
Forum: Projects
Topic: GooData: diagrams for screen / printer / files
Replies: 17
Views: 1874

Re: GooData: diagrams for screen / printer / files

Now the bad message: Goo_Data uses a lot of VA_ARG commands. This works well with -gen gas backend, but the compiler doesn't support it with -gen gcc . And gcc is mandatory for 64 bit. So the current Goo_Data cannot get compiled for 64 bit. I see, Jeff Marshall on https://sourceforge.net/p/fbc/bugs...
by badidea
May 20, 2019 22:14
Forum: Projects
Topic: GooData: diagrams for screen / printer / files
Replies: 17
Views: 1874

Re: GooData: diagrams for screen / printer / files

I tried to get this working on linux with 64-bit fbc, but no luck so far. I have libgoocanvas installed (although not sure which version) When I try to compile "GooData-master/examples/test.bas" I get: ld: cannot find -lGoo_Data When I try to compile "GooData-master/src/Goo_Data.bas&q...

Go to advanced search