Adxium
Adxium
is a numeric value that defines the coding method used for writing or reading character strings in a text file by the instructions Wrseq and Rdseq.
adxium
Iomode adxium EXPRESSION Using [ABBREVIATION]
EXPRESSION
is an alphanumeric expression returning the value of the separator.ABBREVIATION
is the abbreviation that has been used to open the file by Openi, Openo, or Openio.Note that this is a global value for all the files opened. Using the Iomode instruction gives you the control on every file opened; which is preferable.
The values that are associated with adxium are the following:
By default, Adxium
is set to a coding in UTF8.
# Let's read a text file generated in UCS2 with CR+LF at the end of every line
# And let's write the result in a UTF8 coded file with LF at the end of every line
Subprog COPY_FROM_UCS2_TO_UTF8(INPUT_FILE,OUTPUT_FILE)
Value Char INPUT_FILE(), OUTPUT_FILE()
Local Char BUFFER(250) : # The lines must not exceed 250 characters
Openi INPUT_FILE Using [INP]
Iomode adxifs '' Using [INP]
Iomode adxirs chr$(13)+chr$(10) Using [INP]
Iomode adxium 122 Using [INP] : # UCS2
Openo OUTPUT_FILE Using [OUT]
Iomode adxifs '' Using [OUT]
Iomode adxirs chr$(10) Using [OUT]
Iomode adxium 0 Using [OUT] : # UTF8
Repeat
Rdseq BUFFER Using [INP]
If fstat
If BUFFER<>""
Wrseq BUFFER; Using [OUT]
Endif
Else
Wrseq BUFFER Using [OUT]
Endif
Until fstat
Openo Using [OUT]
Openi Using [INP]
End
adxifs, adxirs, Rdseq, Wrseq, Openi, Openo, Openio.