Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2007-11

NullAsStringValue definition

6 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Graeme Geldenhuys

Hi,

Does FPC have the 'NullAsStringValue' variable defined anywhere? I'm porting code from Delphi, which uses it. I had a look in my Kylix 3 help and it's mentioned there as well.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 5 lines
Hi, Does FPC have the 'NullAsStringValue' variable defined anywhere? I'm porting code from Delphi, which uses it. I had a look in my Kylix 3 help and it's mentioned there as well.

Never heard of this. Where is it supposed to be and what is it supposed to do ?

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
Never heard of this. Where is it supposed to be and what is it supposed to do ?

I never heard of it before either, until today. :-) In the Kylix 3 help is mentions something like this.... The value stored in the NullAsStringValue variable represents a NULL as a string. By default it is a blank string.

So I guess if you want to represent a NULL value differently, you can set it to say: '<null>'. I guess it works like the ShortDateFormat and friends variables.

I don't have Kylix or Delphi on this (home) pc, but will look at work tomorrow.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt: Never heard of this. Where is it supposed to be and what is it supposed to do ? Michael.
Michael Van Canneyt wrote
Never heard of this. Where is it supposed to be and what is it supposed to do ?

Ah, I found Kylix 3 help in home pc. It is defined in Variants unit. This is the help text.

--------------------------------------

Specifies string value of Null variants.

Unit

Variants

Category

Variant support routines

Delphi syntax:

var NullAsStringValue: String;
C++ syntax:
extern PACKAGE AnsiString NullAsStringValue;

Description

NullAsStringValue specifies the string that is the result of a conversion from a Null variant to a string type. By default, NullAsStringValue is the empty string.

NullAsStringValue is only used when the NullStrictConvert global variable is set to false.
--------------------------------------

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email

Michael Van Canneyt
to Graeme Geldenhuys
Graeme Geldenhuys wrote 9 lines
On 21/11/2007, Michael Van Canneyt wrote: > > Never heard of this. Where is it supposed to be and what is it supposed to > do ? > Ah, I found Kylix 3 help in home pc. It is defined in Variants unit. This is the help text.

Ok. I'll see about having it added.
Can you file a bugreport so it won't be forgotten? (you can assign it to me) I'm rather busy with the copyright issue, so better play it safe :/

Michael.

Reply by email

Graeme Geldenhuys
to Michael Van Canneyt
Michael Van Canneyt wrote
Ok. I'll see about having it added. Can you file a bugreport so it won't be forgotten? (you can assign it to me) I'm rather busy with the copyright issue, so better play it safe :/

Thanks Michael. I'll create a bug report. In the mean time I simply created a fpchelper.pas unit to continue my porting project.

Regards,
- Graeme -

_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/

Reply by email