
Objetivo e utilização:
Lê o registro anterior selecionado por IniciaPorPrefixo a partir do último até o primeiro em ordem alfabética invertida da Chave selecionada. Os parâmetros são compatíveis com os do mesmos nome descritos acima.
Sintaxe:
LeAnteriorPorPrefixo(char * arquivo, struct Itens *itens, char *área)
Parâmetros:
Exemplo em Delphi:
begin
Arquivo := ‘arq1’;
ret := LeRegistroAnteriorPorPrefixo(@Arquivo,@reg);
if ret = -1 then
begin
{Início de Arquivo - EOF}
end
else if ret = 0 then
begin
{Achou registro para esta pesquisa}
end
else
begin
{Aqui ret é maior que 0 – Deu erro}
ret := ObtemMensagem(@msg);
ShowMessage(msg);
end;
end;
Exemplo em VB:
