Search found 260 matches

by xlucas
Jan 03, 2018 4:41
Forum: General
Topic: Graphical letters in textscreen
Replies: 10
Views: 374

Re: Graphical letters in textscreen

Console mode is not the same as text mode. It sounds obvious, but until the first time I realised how true this was, I was sure the difference was something more subtle. If you've started your programming in DOS, like I did, then you're used to being able to exploit the whole of the hardware text mo...
by xlucas
Dec 21, 2017 19:04
Forum: General
Topic: Goto var
Replies: 15
Views: 475

Re: Goto var

Yes. That is true. It all depends on the size of your var and how fast you want the thing to be. But it's something that comes with FreeBasic without hacking and it's pretty fast with that in consideration. Maybe the best "vanilla" option.
by xlucas
Dec 21, 2017 18:57
Forum: General
Topic: Managing 2 windows (or window/console) without additional libs
Replies: 5
Views: 271

Re: Managing 2 windows (or window/console) without additional libs

Another solution would be to create a frameless, transparent window the size of the desktop (or two desktops), use a transparent background and draw the windows yourself. It can be a lot of work, but depending on what you want it for, maybe it's what you'd prefer to do.
by xlucas
Dec 21, 2017 18:48
Forum: General
Topic: Goto var
Replies: 15
Views: 475

Re: Goto var

Select Case As Const is the fast alternative to Select Case that does just what Albert was asking, I think. If I understand correctly, it uses a translation table instead of comparing for each value. So that'd be a XLAT followed by a JMP , right? I personally see Select Case As Const as the modern ...
by xlucas
Dec 03, 2017 2:24
Forum: Community Discussion
Topic: time to say goodbye
Replies: 53
Views: 3209

Re: time to say goodbye

FreeBASIC is a boat without a captain. BASIC is for beginners and this is OK but too much idiots and trolls here and the moderators are blind or sleeping. It'd really be a great loss if you go, Joshy. I wonder if you'll actually read all these posts. There's a couple of points I'd like to make abou...
by xlucas
Nov 23, 2017 7:09
Forum: Tips and Tricks
Topic: draw rotated ellipse
Replies: 8
Views: 509

Re: rotate oval

That looks very neat, mate! :) It occurs to me that, instead of the space bar, the right mouse button could be used to switch between changing the radius and rotating the oval. Just an idea.
by xlucas
Nov 23, 2017 7:02
Forum: General
Topic: Signed/unsigned equality. Bug?
Replies: 17
Views: 569

Re: Signed/unsigned equality. Bug?

Maybe. But well, I wasn't able to replicate that in my shorter example. I'd like to be able to isolate the effect. I thought I had when I first posted. The TargaSave function does have that, but the shorter code seems to always compile the same.
by xlucas
Nov 23, 2017 6:33
Forum: General
Topic: How non-random was QB's RND
Replies: 40
Views: 886

Re: How non-random was QB's RND

We still have not got the answer, but are we getting any closer? I think we already have like half the answer, ha, ha. I've been thinking about this and testing the code. I haven't been able to make your LCG produce the same results, but I think that makes sense. Strictly speaking counting_pine's f...
by xlucas
Nov 23, 2017 3:04
Forum: General
Topic: How non-random was QB's RND
Replies: 40
Views: 886

Re: How non-random was QB's RND

Well, yes and no. The PRNG is very good for most tasks. If you just use a few requests, then it's impossible to notice anything. On the other hand, I found this pattern after only one year of playing with QB, without looking for anything and completely by chance. What I mean is, another person, more...
by xlucas
Nov 23, 2017 0:33
Forum: General
Topic: Signed/unsigned equality. Bug?
Replies: 17
Views: 569

Re: Signed/unsigned equality. Bug?

Compilers don't compare binaries. They create a tree node for the comparison, and the semantic phase of the compiler will insert needed conversions to make the types match a pair that the compiler has a comparison for. You clearly know a lot more than I about the matter and you've said it in better...
by xlucas
Nov 23, 2017 0:06
Forum: General
Topic: How non-random was QB's RND
Replies: 40
Views: 886

Re: How non-random was QB's RND

That is not correct. (4) is redundant. Ooops! Actually, that parameter 4 is a mistake I made. It wasn't present in the original code I wrote in the 90s. What happened is that I "misremembered" that FB allowed one to select the PRNG method by changing the parameter in RND , so I started tr...
by xlucas
Nov 22, 2017 1:14
Forum: General
Topic: How non-random was QB's RND
Replies: 40
Views: 886

How non-random was QB's RND

Just wanted to post a slightly modified short BAS program I made in 1994 in QuickBasic. I don't know what I was trying to do and suddenly, I got this result, which made me realise how non-random QB's RND was, so I saved it. Now, when I saw FB is capable of reproducing the same RND function, I wonder...
by xlucas
Nov 22, 2017 0:35
Forum: General
Topic: Signed/unsigned equality. Bug?
Replies: 17
Views: 569

Re: Signed/unsigned equality. Bug?

Thanks, DamageX. I know why this happens. But if it happens, it is still a problem. Munair, maybe you're not getting my point. I am not confused. Let me explain again in more detail: - I understand that, while the binary representation of two numbers may be equal, this does not mean the numbers them...
by xlucas
Nov 21, 2017 7:16
Forum: General
Topic: Signed/unsigned equality. Bug?
Replies: 17
Views: 569

Re: Signed/unsigned equality. Bug?

Munair, yes, indeces are always unsigned and I used a signed index variable, but it's still always positive, so it shouldn't make a difference. [...]is because it is a 32bit data type. It is not portable. All types are portable (except possibly Integer if you use it as a 64bit integer number). What ...
by xlucas
Nov 21, 2017 6:29
Forum: General
Topic: Signed/unsigned equality. Bug?
Replies: 17
Views: 569

Re: Signed/unsigned equality. Bug?

I don't think it is a bug that the numbers give non-equal. I think it could be a bug that it gives a different result if compiled in 32bit. I'm trying to replicate it now and realised the code as I posted it is giving non-equal on both, so I'll have to check back the original code (much longer) to s...

Go to advanced search