prompt with a numeric message identifier

Discussions about editing and cleaning data
Post Reply
AriSilva
Posts: 433
Joined: July 22nd, 2016, 3:55 pm

prompt with a numeric message identifier

Post by AriSilva » November 6th, 2020, 6:14 am

The help says that the prompt accepts a message, but it cannot be from the message file.
That is,
prompt(500, password);
where
Message file
500 Type your password
It issues a compiler error message
Best
Ari

Gregory Martin
Posts: 1375
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: prompt with a numeric message identifier

Post by Gregory Martin » November 9th, 2020, 7:59 am

The helps say "showing the string expression message." Except for the errmsg/maketext/... group of functions, which can take a string or a number, all other CSPro functions require strings. The shortest workaround for that is the tr function:
prompt(tr(500), password);

Post Reply