Ir para conteúdo
Fórum Script Brasil
  • 0

(Resolvido) NUL em txt


Marcos Santana

Pergunta

4 respostass a esta questão

Posts Recomendados

  • 0
Colegas como incluir o null em um txt
Não entendi ... qual a finalidade ?

Help do delphi ( F1 )

Many programming languages, including C and C++, lack a dedicated string data type. These languages, and environments like Windows that are built with them, rely on null-terminated strings. A null-terminated string is a zero-based array of characters that ends with NULL (#0); since the array has no length indicator, the first NULL character marks the end of the string. You can use Object Pascal constructions and special routines in the SysUtils unit (see Standard routines and I/O) to handle null-terminated strings when you need to share data with systems that use them.

For example, the following type declarations could be used to store null-terminated strings.

type

TIdentifier = array[0..15] of Char;

TFileName = array[0..259] of Char;

TMemoText = array[0..1023] of WideChar;

You can assign a string constant to a statically allocated zero-based character array. (Dynamic arrays won’t work for this purpose.) If you initialize an array constant with a string that is shorter than the declared length of the array, the remaining characters are set to #0.

abraço

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,2k
    • Posts
      651,9k
×
×
  • Criar Novo...