On Wed, Jun 06, 2001 at 12:02:37PM -0600, Sara Strader wrote:
> Is this a Perl Script? If not, does anyone know what it is?
>
> File newnum:
> ++++++++
>
> 1: r+ERROR: Tried to open %s . %s. (error number %d)
> 2: ./newnum.lst-d%s %d
> 3: PLEASE ENTER EMPLOYEES' FULL NAME: "%s", Is this correct [y/n] :
> 4: "%s" is already in list file with number %d.
> 5:
> 6: New number for "%s" is %d. Adding new number to list.
> 7: %s,%d
> 8: ~
>
> ++++++++
This isn't a programming language at all. It appears to be a language file;
some program uses this file to output messages.
Say you have a Perl snippet:
print(q{New number for "$for" is $num. Adding new number to list.\n");
You want to make it a little easier to replace the message, so you convert
it to something like:
print(gettext(6, $for, $num));
Where gettext() reads line 3 from your "newnum" file and uses sprintf to
replace the %s and %d with $for and $num, respectively. From then on, you
have but to alter the lines in "newnum" to change the messages your program
outputs. This type of thing is used mostly for internationalization. The
way it's being done here, however, seems a little ad-hoc; if it truly is
meant for internationalization it's very fragile. Where variable text gets
replaced is order-dependent ($for is always the first thing to be replaced,
$num always the second), and many languages would need to change the order.
That's my best guess as to what the file is for.
Michael
--
Administrator www.shoebox.net
Programmer, System Administrator www.gallanttech.com
--