Code: Select all
If f<>9:EndIf; <- no error
If f<=9:EndIf; <- no error
If f=<9:EndIf; <- no error
If f>=9:EndIf; <- no error
If f=>9:EndIf; <- no error
Code: Select all
If f><9:EndIf; <- syntax error
Code: Select all
If f<>9:EndIf; <- no error
If f<=9:EndIf; <- no error
If f=<9:EndIf; <- no error
If f>=9:EndIf; <- no error
If f=>9:EndIf; <- no error
Code: Select all
If f><9:EndIf; <- syntax error
Code: Select all
=<
=>
> =
< =
< >
They're not idiotic; they've been part of all Basic languages for decades (not just PureBasic), and are documented in the manual here:Josh wrote:These idiotic syntaxes (sorry Fred) work, but are not documented.
+1Dude wrote:They're not idiotic; they've been part of all Basic languages for decades (not just PureBasic), and are documented in the manual here:Josh wrote:These idiotic syntaxes (sorry Fred) work, but are not documented.
https://www.purebasic.com/documentation ... ables.html
Oops, I may have missed something, but that doesn't change the fact that it's idiocy. Using =< (and others) does not make the code better or shorter.Dude wrote:and are documented in the manual
Thanks for the link. I found any number '<=' but none '=<' for different languages.Cyllceaux wrote:https://en.wikipedia.org/wiki/Relational_operator
exactly what I said. It's idotic.Cyllceaux wrote:a <= b | a lower equals b
a >= b | a greater equals b
=< doesn't look right... doesn't feel right
Code: Select all
If a :) And b :[ c Or >__<
Code: Select all
If not a=b
It's been normal Basic syntax since the 1970s.... but you don't have to use it that way, you know.Cyllceaux wrote:=< doesn't look right... doesn't feel right
Take a look at the ASM output... Still prefer Not?Mistrel wrote:I very, very rarely ever use <>. I prefer:
It just reads better to me.Code: Select all
If not a=b
Code: Select all
; If a <> b
MOV ebx,dword [v_a]
CMP ebx,dword [v_b]
JE _EndIf2
; EndIf
_EndIf2:
; If Not a = b
MOV ebx,dword [v_a]
CMP ebx,dword [v_b]
JNE No0
XOR eax,eax
JMP Ok0
No0:
MOV eax,1
Ok0:
AND eax,eax
JE _EndIf4
; EndIf
_EndIf4:
I had no idea!chi wrote:Take a look at the ASM output... Still prefer Not?Mistrel wrote:I very, very rarely ever use <>. I prefer:
It just reads better to me.Code: Select all
If not a=b
Code: Select all
; If a <> b MOV ebx,dword [v_a] CMP ebx,dword [v_b] JE _EndIf2 ; EndIf _EndIf2: ; If Not a = b MOV ebx,dword [v_a] CMP ebx,dword [v_b] JNE No0 XOR eax,eax JMP Ok0 No0: MOV eax,1 Ok0: AND eax,eax JE _EndIf4 ; EndIf _EndIf4: