Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 2 of 2 total
Thread Assigning NIL to a variable of type variant
Fri, Mar 17 2017 3:10 AMPermanent Link

Michael Dreher

I tried to initialize a variable "v" of type variant with

 v := NIL; // Pascal

expecting a translation

 v = null; // JavaScript

as it's done with variables of type TObject. But it's translated into

 v = NIL; // JavaScript

NIL is not defined in JS.

M. Dreher
Fri, Mar 17 2017 8:21 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Michael,

<< I tried to initialize a variable "v" of type variant with

 v := NIL; // Pascal

expecting a translation

 v = null; // JavaScript

as it's done with variables of type TObject. But it's translated into

 v = NIL; // JavaScript

NIL is not defined in JS. >>

Thanks, I'll check it out.  It's probably related to the prior variant assignment fix.

Tim Young
Elevate Software
www.elevatesoft.com
Image