Kbase 20128: -isnoconv Startup Parameter is a Compile Time Parameter
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  12/11/2002 |
|
Status: Unverified
GOAL:
To further document the Initial Value Segment No Convert startup parameter (-isnoconv).
FACT(s) (Environment):
Progress 9.1x
FIX:
The -isnoconv parameter is a startup parameter that is used purely at compile time. If you want to avoid the additional conversion of text literals provided from -cprcodein to -cpinternal, the parameter must be used to start the compilation session.
For an example, follow these steps:
1) Enter the following code and save it as isnoconv.p:
/* isnoconv.p */
def var v as char init "áéíóú".
def var str as char init "ÊTÄT":U .
def var tempkey as inte.
display str
ASC(substring(str,1,1)) FORMAT "999"
ASC(substring(str,2,1)) FORMAT "999"
ASC(substring(str,3,1)) FORMAT "999"
ASC(substring(str,4,1)) FORMAT "999" WITH FRAME f2.
display v
ASC(substring(v,1,1)) FORMAT "999"
ASC(substring(v,2,1)) FORMAT "999"
ASC(substring(v,3,1)) FORMAT "999"
ASC(substring(v,4,1)) FORMAT "999"
ASC(substring(v,4,1)) FORMAT "999" WITH FRAME f3.
update v with frame f1 width 20 editing :
readkey.
apply lastkey.
display lastkey.
end.
2) Make a directory, noconv from your working
directory.
3) Start a 9.1A session with:
Prowin32.exe -cpstream ibm850 -cpinternal ibm850
4) Compile isnoconv.p with:
compile isnoconv.p save
5) Start a 9.1A session with:
Prowin32.exe -cpstream ibm850 -cpinternal ibm850
-isnoconv
6) Compile isnoconv.p with:
compile isnoconv.p save into noconv
7) Start a Progress Version 9.1A session with:
Prowin32.exe -cpinternal 1252
8) Run:
RUN isnoconv.p.
RUN noconv/isnoconv.p.
You can see the differences in the output caused by compiling with and without the -isnoconv parameter. Compiling without the parameter converts the already pre-converted text literals to cpinternal (1252) when the r code is read into memory. This consequently produced an incorrect result. Compiling with
-isnoconv parameter prevents the additional conversion.