Tony,
This is not in the latest 7.2 manuals and when I try the following program
using
7.2.3 PE
CRT NOT(ASSIGNED(A))
A = 1
CRT NOT(ASSIGNED(A))
END
then I get the following. :
:BASIC BP TEST.ASSIGNED
Compiling Unibasic: BP\TEST.ASSIGNED in mode 'u'.
warning: "ASSIGNED" may be one dimension matrix.
compilation finished
:RUN BP TEST.ASSIGNED
In BP\_TEST.ASSIGNED at line 1 WARNING: UNINITIALIZED VARIABLE USED! Zero Assume
d!
In BP\_TEST.ASSIGNED at line 1 WARNING: UNINITIALIZED VARIABLE USED! Zero Assume
d!
1
1
Are you sure you haven't got a function along the lines of:
FUNCTION ASSIGNED(VAR)
RETURN NOT(UNASSIGNED(VAR))
END
This will of course require a DEFFUN statement but this could be in some
INCLUDE
file.
Andy
----- Original Message ----
From: Tony Gravagno <[email protected]>
To: [email protected]
Sent: Wed, 14 July, 2010 20:50:29
Subject: [U2] Unidata UNAssigned() vs Assigned()
This is dumb, sorry. In my cross-platform code I have a check to
see if the platform is Unidata, and if so, I say:
IF UNASSIGNED(VAR) THEN ...
for all other MV platforms I use:
IF NOT(ASSIGNED(VAR)) THEN ...
I just noticed that in some code I wrote two years ago that I had
removed the DBMS check and all platforms are using IF
NOT(ASSIGNED()). Unfortunately (slapping myself) there's no
comment in the code to support why that change was made.
Did they introduce support for ASSIGNED() in some v7.2 release of
Unidata - or maybe that was just a bad change? I don't see this
in any release notes. I'd just like to know if/when it was
introduced so that I know where I should (not) use ASSIGNED() in
new development. For this product (NebulaXLite that creates
Excel workbooks) I'm inclined to continue to use UNAssigned since
I don't want to have to check which release of Unidata someone
might be using.
Thanks.
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula R&D sells mv.NET and other Pick/MultiValue products
worldwide, and provides related development services
remove.pleaseNebula-RnD.com/blog
(Latest blogs on Web Services with MV)
Visit PickWiki.com! Contribute!
http://Twitter.com/TonyGravagno
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users
_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users