On 17/03/16 11:11, Marcel Kilgus wrote:
Actually I can tell a lot about programmers through the way they
structure and indent their code. Except the missing spaces in the for
loop in line 428 this is as spotless as I've ever seen it ;)
Are you sure you were looking at my code? ;-) (But thanks!)
I'll get 428 sorted next time I have a change to make.
Someone once said the same about my SupeBasic code too, I think it was
my QSAVE'd file decoder, but I might be wrong. I think it's on Dilwyn's
site somewhere.
Can't
even scold you for the use of strncpy as you've properly documented
it!
It's a well known feature/bug! strcpy() terminates, strncpy() might
terminate! There's nothing like consistency.
Of course if C is the right language for parsing and emitting
text is another discussion ;)
In this case the utility was for an AIX Unix system with a pretty much
brain dead C compiler and nothing else, so it had to be C.
Normally for parsing, I'd use ANTRL4, build a grammar and have it
generate a lexer and parser then inherit the parser and build by
"compiler" or whatever from that, in Java. Which I absolutely hate! I'm
waiting for the C/C++ lexer/parser versions to come out, at the moment
it's Java, Javascript or Python only.
See https://github.com/NormanDunbar/Tnsnames_checker for an even less
interesting example!
I'm definitely not learning Perl, no way, not now, not ever! :-)
Cheers,
Norm.
--
Norman Dunbar
Dunbar IT Consultants Ltd
Registered address:
27a Lidget Hill
Pudsey
West Yorkshire
United Kingdom
LS28 7LG
Company Number: 05132767
_______________________________________________
QL-Users Mailing List