1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

  2. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

Determine Unix or Windows EOL character

Discussão em 'StackOverflow' iniciado por fdantas, Fevereiro 2, 2018.

  1. fdantas

    fdantas Administrator Moderador

    I am reading a file and interested in knowing the operating system that generated the file. It can be either Windows or Unix. I am trying to determine the operating system by reading end of line character. I am facing difficulty in getting the character at end of line. I tried the following code but it always returns -2 irrespective of the operating system (which is correct as per the documentation). Thanks for your help.

    def var cLog as char init "myfile.log".

    input from value (cLog).
    seek input to end.

    readkey.
    message lastkey.

    Continue reading...

Compartilhe esta Página