Recent

Author Topic: How can I use: "VarIsNull and VarIsEmpty" in Lazarus  (Read 6968 times)

jorgealfredoramirez

  • New member
  • *
  • Posts: 7
How can I use: "VarIsNull and VarIsEmpty" in Lazarus
« 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

marcov

  • Administrator
  • Hero Member
  • *
  • Posts: 11383
  • FPC developer.
Re: How can I use: "VarIsNull and VarIsEmpty" in Lazarus
« Reply #1 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

jorgealfredoramirez

  • New member
  • *
  • Posts: 7
Re: How can I use: "VarIsNull and VarIsEmpty" in Lazarus
« Reply #2 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