> ord('Z')

I can not remember a single compiler -- like old pascal on university 
mainframes with teletype terminal without monitor screen, or Modula and Oberon 
compilers where it made sense to introduce a named constant for this. Because 
'Z' is already a 8 bit integer constant, so the ord() call is basically a nop, 
it only tells the compiler that we want to use 'Z' as what it internally is, 
and not as a more abstract character entity. I think even when we call ord() on 
a runtime variable of type char it is a nop. The ord() function is special in 
the regard as it is internal to the compiler, which makes me even more 
optimistic that it is fine even for tinyC compiler.

Unfortunately things are much worse for true proc calls. I have never managed 
to tell the Nim compiler that it should optimize the second proc call when 
arguments are unchanged to the first one. There was a forum thread from me 
about that topic some years ago.

Reply via email to