Back to Four Js Website
Four Js Customer Forum
Subscribe for automatic updates:
RSS
Sign in for full access
|
Help
Four Js Development Tools Forum
>
Discussions by product
>
Genero BDL
>
Feature request, LET variable.* = value OR INITIALIZE variable.* TO value
Most recent posts
Pages: [
1
]
« previous
next »
Reply
|
Print
Author
Topic: Feature request, LET variable.* = value OR INITIALIZE variable.* TO value (Read 10779 times)
David H.
Posts: 158
Feature request, LET variable.* = value OR INITIALIZE variable.* TO value
«
on:
April 18, 2008, 04:00:38 pm »
I was a bit surprised when I coded:-
LET my_rec.* = 0
(for a record containing DECIMALS & INTEGERS only) and it failed with a compile error. I just assumed the compiler would allow this syntax and leave it up to the programmer to do the correct thing i.e. not set a DECIMAL to a STRING for instance.
You have the same thing with INITIALIZE my_rec.* TO value, where the compiler reports NULL expected instead of 'value'. It would be nice to be able to code:-
LET my_rec.* = value or
INITIALIZE my_rec.* TO value
as this is a useful code saving.
David
Sebastien F.
Posts: 545
Re: Feature request, LET variable.* = value OR INITIALIZE variable.* TO value
«
Reply #1 on:
April 21, 2008, 09:30:32 am »
Hello David,
I believe that records defined only with numeric members is not a common usage, so I don't think LET rec.* = value or INITIALIZE rec.* TO value would be a real added value to Genero...
I do also believe it's seldom to initialize all members of a record with the same value, except NULL of course, which is by the way not a "value", but rather a "non-value"...
Best regards,
Seb
David H.
Posts: 158
Re: Feature request, LET variable.* = value OR INITIALIZE variable.* TO value
«
Reply #2 on:
April 21, 2008, 05:02:04 pm »
Hi Seb,
I was just using a number as an example, I don't see why any value could not be used. INITIALIZE is fairly flexible and can be used with THRU, on arrays and lists of variables, so it offers several ways currently to set multiple values to NULL via a single line of BDL code. My thinking is that TO value just offers you even more options...
I don't know about others but we tend to set all numeric values to 0 when initializing so NULL does not become an issue if or when the values are used in some calculation somewhere...
D.
Pages: [
1
]
Reply
|
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Discussion
=> Ask Reuben
=> WWDC21
-----------------------------
Discussions by product
-----------------------------
=> Products announcements
=> Genero BDL
=> GWS
=> GAS and GBC
=> GDC
=> Genero Mobile for Android or iOS
=> Genero Studio
=> Reporting tools (GRW, GRE)
-----------------------------
Jobs
-----------------------------
=> Jobs
Powered by SMF 1.1.21
|
SMF © 2015, Simple Machines
Loading...