Recent Posts

Pages: [1] 2 3 ... 10
1
General questions and discussions / Re: Basic Logic
« Last post by ZXDunny on 19. May 2019, 21:06:03 »
Trust me, Aurel, I know how booleans work - I really wouldn't be spending most of my days writing complex audio processing software if I didn't :D

As for the forum - we've moved to other places now. There's SpecBAS on Discord, Facebook, Twitter, IRC as well as web sub-forums integrated into various retro places. I don't work on SpecBAS as much as I used to because work generally takes precedent, but I do commit new changes to the repo from time to time. I'm also getting started on my older projects such as ZXSpin and BASin which badly need to be updated to work in Windows 10 these days.
2
General questions and discussions / Re: Basic Logic
« Last post by Aurel on 19. May 2019, 19:58:40 »
By the way when we "talk" Dunny
long time i don't visit your site/forum ...
where are all that people  :o
last post 2018.....

hmmm same thing everywhere...
it looks to me that all gone
maybe are on qb64 forum  ;D
3
General questions and discussions / Re: Basic Logic
« Last post by Aurel on 19. May 2019, 19:36:46 »
Yo Mark yes i made mistake because of stupid talk about things we know.
Both me and Paul and i don't know why he insist on this .. :o

This BOOL or BOOLEAN already exists in Oxygen Basic compiler
and i am not sure in some others too (maybe VB)
so....what a heck is this time with you ?
So i must repeat again ...I just agree with the statement above..
and your insinuation that i don't know or don't understand is really silly.. ;D
and you UNDERSTAND

Mark yeah

print BOOL(1<2)  -> TRUE or -1( on Windows) or if author of progrmming language decide
can be 1.
Also you can easy change booleans to integers because are integers ... 0,1
I have used many times so called boolean logic to confirm TRUE or FALLSE.

simple example in o2
both functions are valid without any problem ,only difference is what is TRUE ( -1 or 1)
depend how you define them:

FUNCTION isdigit(S AS STRING) AS INT
     If (asc(S)>47 And asc(S)<58) Or asc(S)=46
     Return 1
     End if
     Return 0
END FUNCTION

FUNCTION isdigit(S AS STRING) AS BOOL
     If (asc(S)>47 And asc(S)<58) Or asc(S)=46
     Return TRUE
     End if
     Return FALSE
END FUNCTION 

..so ZXdunny do you maybe need compiled example ;D
pih..
4
General questions and discussions / Re: Basic Logic
« Last post by B+ on 19. May 2019, 17:50:10 »
If so, I have some very bad news for you.

What kind of bad news?

Paul
I just confirm what man above stated.
and that shouldn't be valid BASIC statement
print 1 > 2 -> show  -1 (true)

what a heck is that in BASIC world...
Of course that i understand what that mean but is stupid..

should be ;( with more sense ..with boolean type )

print BOOL(1>2) ->  -1

What a heck!?!?
1>2 is False = 0
Is there a Basic that returns True?
5
General questions and discussions / Re: Basic Logic
« Last post by ZXDunny on 19. May 2019, 16:53:25 »
Because is stupid and unlogical and as i show should be typed
As Boolean .

In computing, everything is a number. Including booleans.

Of course that i know that..  ::)

I was wondering if you did, given what you're posted here tbh. So you want a new type to be created, "Boolean" which all BASICs should be using instead of numerical equivalents? How would we represent these at the assembly language level? How would we handle "LET a=(b>c)"? Would that particular case be disallowed, as a numeric variable cannot hold a boolean value, or would the variable (a) be converted to hold a boolean value? Would we allow users to cast booleans as integers? And how would they be converted?
6
General questions and discussions / Re: Basic Logic
« Last post by Aurel on 19. May 2019, 08:23:26 »
Because is stupid and unlogical and as i show should be typed
As Boolean .

In computing, everything is a number. Including booleans.

Of course that i know that..  ::)
7
General questions and discussions / Re: Basic Logic
« Last post by ZXDunny on 19. May 2019, 00:26:24 »
If so, I have some very bad news for you.

What kind of bad news?

In computing, everything is a number. Including booleans.

Quote
Paul
I just confirm what man above stated.
and that shouldn't be valid BASIC statement
print 1 > 2 -> show  -1 (true)

what a heck is that in BASIC world...
Of course that i understand what that mean but is stupid..

should be ;( with more sense ..with boolean type )

print BOOL(1>2) ->  -1

But a boolean is just a number - usually 1 or 0 for true or false (or in some dialects it's all bits set, so $FF if 8bit etc which yields -1 when viewed as a signed value) so the above statement is perfectly valid. But people who don't understand how a CPU works under the hood will often be surprised that 1<=x<=10 will always result in a true (non-zero) value.

I was puzzled that you said it shouldn't be valid BASIC. Why not?
8
General questions and discussions / Re: Basic Logic
« Last post by Aurel on 18. May 2019, 21:13:24 »
If so, I have some very bad news for you.

What kind of bad news?

Paul
I just confirm what man above stated.
and that shouldn't be valid BASIC statement
print 1 > 2 -> show  -1 (true)

what a heck is that in BASIC world...
Of course that i understand what that mean but is stupid..

should be ;( with more sense ..with boolean type )

print BOOL(1>2) ->  -1
9
General questions and discussions / Re: Basic Logic
« Last post by ZXDunny on 18. May 2019, 12:22:09 »
So you're saying that "=", "<=", "<>" etc should not return a numerical value, yes? So what should they return, and how should it be represented in memory? As something other than a value? If so, I have some very bad news for you.
10
General questions and discussions / Re: Basic Logic
« Last post by Aurel on 18. May 2019, 07:50:54 »
Boolean is RESULT of comparison expression..
if we can call such a operation expression.
Pages: [1] 2 3 ... 10