How to: command line args for pascal on Sun

        Thanks for your replies on the above problem. You all gave the same
solution, ie paramcount() and paramstr().
What I failed to realise was that Sun Pascal is very different to Turbo
and Borland pascal. I dont know if it is even ansi satndard.

Anyway it does not include paramstr and paramcount as inbuilt functions
but on further digging I found it has argv() and argc() similar to C.

These would be fine except I want to pass integers as the args and argv(i, a)
wants to put the i'th argument into a char array. It will do this OK
but then I cannot work out how to easily convert this back to the integer
that I want to work with.

var argtxt : array [1..10] of char;

argv(1, argtxt);

This puts 1st arg into array but if arg can be 1 to 32k how do I easily convert
it to an integer ??

Anymore ideas would be great

Brendan Charles Programmer/Analyst/All round good guy  |Things are always
Lactos Pty Ltd - Master Cheesemakers - Australia       |found in the last place
Ph  +61 04 312566 Fax +61 04 312647 TZ=GMT+10hrs       |we look - for who                        |searches after finding?