Search found 2135 matches

by badidea
Nov 29, 2020 0:38
Forum: Community Discussion
Topic: Free basic
Replies: 3
Views: 233

Re: Free basic

https://nr100.home.xs4all.nl/badidea/tank_game_tut/tutorial_05.html Lol, I should continue with that game some day. But not really a freebasic starting point I think. @Sammy25, like BasicCoder2 said, do have any coding experience? Do you have the compiler installed? Can you compile and run a simple...
by badidea
Oct 23, 2020 23:16
Forum: Beginners
Topic: [HELP] KNN code doesn't work
Replies: 68
Views: 2368

Re: [help] converting code from python to FB

okay then what should i use instead? how do i loop over all values in x()? Freebasic gives one more element than what you might expect compared to other languages. "dim as integer x(10)" gives you 11 elements: 0 to 10 and is the same as "dim as integer x(0 to 10)". ubound(x) wil...
by badidea
Oct 21, 2020 22:08
Forum: Linux
Topic: SETENVIRON
Replies: 16
Views: 528

Re: SETENVIRON

Ah, that make sense. sub set() dim as string MYCOUNT="123" dim as string envStr1 envStr1 = "COUNT=" + MYCOUNT '' envStr1 must always exist without ever being modified SETENVIRON(envStr1) end sub set() print ENVIRON("COUNT") Fail dim shared as string envStr1 sub set() di...
by badidea
Oct 21, 2020 20:34
Forum: Linux
Topic: SETENVIRON
Replies: 16
Views: 528

Re: SETENVIRON

and this? dim as string MYCOUNT="123" SETENVIRON(("COUNT=" + MYCOUNT)) print ENVIRON("COUNT") 'will return a NULL Fail dim as string MYCOUNT="" SETENVIRON("COUNT=123" & MYCOUNT) print ENVIRON("COUNT") Fail dim as string MYCOUNT="&...
by badidea
Oct 21, 2020 20:01
Forum: Beginners
Topic: [HELP] KNN code doesn't work
Replies: 68
Views: 2368

Re: [help] converting code from python to FB

Don't use 0 TO UBOUND(x) - 1 if you want to loop all values in x().
by badidea
Oct 21, 2020 19:24
Forum: Tips and Tricks
Topic: The beauty / magic of math (28 examples) Vol. I
Replies: 10
Views: 716

Re: The beauty / magic of math

Rivers2 should use double for timer.

For flame, why not use cint(x) for assembly round() function? Then is works with fbc32 as well.
by badidea
Oct 20, 2020 17:24
Forum: General
Topic: paper backup
Replies: 3
Views: 173

Re: paper backup

Interesting. The paper backup was also recently discussed in 'squares', but the possibilities overestimated by a factor 10,000 by a certain forum member.
by badidea
Oct 16, 2020 7:08
Forum: General
Topic: Menu Slowness
Replies: 3
Views: 176

Re: Menu Slowness

Simple answer, add "sleep 1" in the loop. Today's CPUs (and operating systems) are different than CPUs form a few decades ago. But is that freebasic code? loop is a reserved keyword. And try to a avoid goto , this often results in code that is hard to read (for yourself and others). If you...
by badidea
Oct 12, 2020 21:31
Forum: General
Topic: Runtime error 12 when I try to quit my prog
Replies: 7
Views: 233

Re: Runtime error 12 when I try to quit my prog

For "Aborting due to runtime error 12 ("segmentation violation" signal) in ..." Did you compile with -exx for extra debugging information? For the game loop there are several possibilities. You can have a 'select block' with loops inside it, but you can also make 1 loop with a 's...
by badidea
Oct 04, 2020 21:24
Forum: Projects
Topic: Eschecs FreeBASIC (UCI chess GUI)
Replies: 445
Views: 64997

Re: Eschecs 1.2.1 (UCI chess GUI)

I still have fbsound issues. I compared with freebasic-miner (using fbsound). There the 32-bit version work fine. miner64 also crashes here with "error: lib fbsound-64 not loaded ! Segmentation fault (core dumped)". The 32-bit fbsound files form eschecs and freebasic-miner are different si...
by badidea
Oct 04, 2020 21:15
Forum: General
Topic: Project of a multiplatform version of FreeBasic Miner
Replies: 37
Views: 1331

Re: Project of a multiplatform version of FreeBasic Miner

Can you put your git-version link in the first post? Then it is easier to find.
by badidea
Oct 02, 2020 19:17
Forum: Community Discussion
Topic: immutable thread titles?
Replies: 43
Views: 1322

Re: immutable thread titles?

jj2007 wrote:I've found something about Python's Command() equivalent here. It's ridiculously complicated.

If you think that FreeBasic is slow and wasting memory, then Python definitely not your cup of tea :-)
by badidea
Oct 01, 2020 19:59
Forum: Community Discussion
Topic: immutable thread titles?
Replies: 43
Views: 1322

Re: enjoy it while you last

It was fun while it lasted and still fun for those of us who are too old to move on. If I think that programming in FreeBasic is still fun, does that mean that I am too old to move on? Some cut their teeth earlier - I cut mine in about 1965 when Fortran, Cobol, Algol, Assembler and BASIC were the t...
by badidea
Oct 01, 2020 17:45
Forum: Community Discussion
Topic: immutable thread titles?
Replies: 43
Views: 1322

Re: immutable thread titles?

Imagine if BASIC had not existed and FreeBASIC hit the streets today, or PowerBASIC or PureBasic and others, for that matter, I wonder what sort of stir would be created. However, of course, the word 'basic' would not be used. I can imagine comments like: "Have you seen what this new language ...

Go to advanced search