Re: [firebase-br] NULL handling in UDFs (Em Delphi) - Solução

Maycon Ferraça maycon em nucleosistemas.com.br
Ter Jun 13 11:50:47 -03 2006


  //Seguindo o exemplo da função:
  function myRight(Str: PChar; var Count: integer): PChar; cdecl; export;
  begin
     if not Assigned(Str) then
     	Result := Nil
     else
     begin
         Result := Str;
         StrPCopy(Str, Copy(Str, Length(Str) - Count + 1, Count));
     end;
  end;

  --Seguindo o exemplo da declaração:
  DECLARE EXTERNAL FUNCTION SRIGHT
       CSTRING(254) NULL,
       INTEGER
  RETURNS CSTRING(254)
  ENTRY_POINT 'myRight' MODULE_NAME 'myudf'


Maycon Ferraça escreveu:
> Resolvido!
> 
> Maycon Ferraça escreveu:
>> Bom dia lista!
>>
>> Tenho uma UDF em Delphi, e seguindo as novas funcionalidades da versão
>> 2.0 sobre retornar NULL na mesma, quais alterações deve fazer para
>> adapta-la?
>>
>> //Seguindo o exemplo da função:
>> function myRight(Str: PChar; var Count: integer): PChar; cdecl; export;
>> begin
>>    Result := Str;
>>    StrPCopy(Str, Copy(Str, Length(Str) - Count + 1, Count));
>> end;
>>
>> --Seguindo o exemplo da declaração:
>> DECLARE EXTERNAL FUNCTION SRIGHT
>>      CSTRING(254),
>>      INTEGER
>> RETURNS CSTRING(254)
>> ENTRY_POINT 'myRight' MODULE_NAME 'myudf'
>>
>> Agradecido!
>> Maycon Ferraça
>>
>>
>> ______________________________________________
>> FireBase-BR (www.firebase.com.br) - Hospedado em www.locador.com.br
>> Para editar sua configuração na lista, use o endereço http://mail.firebase.com.br/mailman/listinfo/lista_firebase.com.br
>> Para consultar mensagens antigas: http://firebase.com.br/pesquisa
>>
> 
> 
> ______________________________________________
> FireBase-BR (www.firebase.com.br) - Hospedado em www.locador.com.br
> Para editar sua configuração na lista, use o endereço http://mail.firebase.com.br/mailman/listinfo/lista_firebase.com.br
> Para consultar mensagens antigas: http://firebase.com.br/pesquisa
> 





Mais detalhes sobre a lista de discussão lista