home *** CD-ROM | disk | FTP | other *** search
- //--------------------------------------------------------------------------
- // Object Scripting
- // Copyright (c) 1996, 1997 by Borland International, All Rights Reserved
- //
- // INTNATL.SPP: International. Demonstrates the use of FormatString() for
- // localization of strings in scripts.
- //--------------------------------------------------------------------------
- print typeid(module());
-
- //
- // IDE imports.
- //
- import IDE;
-
- //
- // Display message to user. When strings are translated, the position and
- // order of some words may change. If there are variables in a string,
- // this can be a problem. FormatString() makes it easier to translate such
- // strings.
- //
- NumScandals = CalcNumScandals();
- Player = "Bob";
- Text = FormatString("Player %1 has lived through %2 scandals.", Player,
- NumScandals);
- IDE.Message(Text, INFORMATION);
-
- //
- // Calculate the number of scandals.
- //
- CalcNumScandals()
- {
- return 12;
- }