Lazarus

Free Pascal => FPC development => Topic started by: jorgealfredoramirez on June 23, 2016, 11:53:05 pm

Title: How can I use: "VarIsNull and VarIsEmpty" in Lazarus
Post by: jorgealfredoramirez on June 23, 2016, 11:53:05 pm
I have the following code from Delphi:

if VarIsNull(ovFolder.Items) or VarIsEmpty(ovFolder.Items)} then Continue;

In Lazarus this code give me the error: Identifier not found "VarIsNull" and "VarIsEmpy". The rest of the code from delphi works fine.

Help me please!!
Jorge
Title: Re: How can I use: "VarIsNull and VarIsEmpty" in Lazarus
Post by: marcov on June 24, 2016, 12:05:41 am
It works the same as in non-ancient (D6+) versions of Delphi: add variants  to your uses clause
Title: Re: How can I use: "VarIsNull and VarIsEmpty" in Lazarus
Post by: jorgealfredoramirez on June 24, 2016, 04:22:49 am
Thank you,

uses
  Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls, ComObj, Variants ;


Now everything is working...
TinyPortal © 2005-2018