There is one thing though that I would put on the con side, which is the lengthy syntax. Having used languages such as quickbasic, visual basic real basic, and pascal, in my view it would be cleaner and nicer coding when using syntax like this:
Code: Select all
sub.b IsAlignment()
local.l a, b, c, j, k
a = GetGadgetState(7)
b = GetGadgetState(8)
c = GetGadgetState(9)
if b <> a and b <> c and c <> a
if not ((b > a) and (b > c))
if a > c
swap a, c
SetGadgetState(7, a)
SetGadgetState(9, c)
endif
; ok
Alignment\p1 = a
Alignment\p2 = b
Alignment\p3 = c
subreturn #true
endif
endif
subreturn #false
endsubI know PureBasic has been around for quite some time and a syntax change or addition will be out of the question. But keeping syntax as short as possible but still understandable would have been a good aim IMHO.
Another example using TYPE instead of STRUCTURE:
Code: Select all
type TAlignmentResult
d.TDate
L.d
lunar.b ; type flag
p1name.s
p2name.s
p3name.s
endtype


