* * *

Author Topic: How can I use: "VarIsNull and VarIsEmpty" in Lazarus  (Read 1495 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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 5338
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...

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus