PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → Return/Echo from Command Line Execution WD19
Return/Echo from Command Line Execution WD19
Iniciado por guest, 11,nov. 2015 22:11 - 2 respuestas
Publicado el 11,noviembre 2015 - 22:11
Hi All,

Forgive me, I'm getting back into WLanguage coding after a long hiatus.

I have a program in which a user passes a bunch of parameters and I read them in using CommandLine().
If the user doesn't enter a required parameter, I need to return a string which states what flags are missing or are invalid.

Something like this:


Thanks!
Georgio
Publicado el 14,noviembre 2015 - 01:53
You might try:

IF CommandLine(9) ~= "" THEN
EndProgram("Message for the User")
END

Replace the 9 with parameter number (1 for first, 2 for second, etc). Obviously you need an IF for each expected parameter. Add any other checking that you need.

Good luck.

Stewart Crisler
Publicado el 14,noviembre 2015 - 22:40
Great, that worked, Stewart.

Thanks!
Georgio