A-Type

46 views
Skip to first unread message

foxy.md

unread,
May 28, 2012, 4:17:38 PM5/28/12
to jBASE
Hi,

In order to use I-type dictionary items in my jbc program I can call
ITYPE() function.

How to use A-type dictionary items? Is there any function for them as
well? (function ATYPE() does not exist :)

mike ryder

unread,
May 29, 2012, 4:49:17 AM5/29/12
to jb...@googlegroups.com
An A-type is exactly the same as a D-type in that it describes a field in the record. It has different positions for the dictionary elements and is related to the Pick/Reality data structure rather than the Universe data structure. jBase supports both types but I would recommend that you standardise on one type or the other otherwise your world becomes very confusing.

Daniel Klein

unread,
May 29, 2012, 7:23:01 AM5/29/12
to jb...@googlegroups.com
No, but it would be a simple matter to convert the A-type to an I-type.

Alternatively (my preference), would be to code the functionality of the A-type directly into the code.

My personal view, fwiw, is that the ITYPE() function carries with it too much baggage (ie, too much to set up before using it).

Dan


--
IMPORTANT: T24/Globus posts are no longer accepted on this forum.

To post, send email to jB...@googlegroups.com
To unsubscribe, send email to jBASE-un...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/jBASE?hl=en

Charlie Noah

unread,
May 29, 2012, 8:51:09 AM5/29/12
to jb...@googlegroups.com
Hi Mike,

I have to respectfully disagree on standardizing on one type or the other. I've worked with Jbase for 13 years in Universe emulation, and find that Pick and Universe type dict items co-exist quite nicely, and aren't confusing (at least to me) at all. Coming from a long Reality/Pick/Ultimate etc. background, I tend to use Pick types whenever possible. I use correlatives a lot, marking them as S types instead of A for sorting and documentation purposes. I realize the computer doesn't care whether it's an A or an S, but I do. There are some things a correlative can't do, however (blasphemy!), and Universe I-type fill the need very nicely, although sometimes more slowly. There is room for both - the right tool for the job and all that.

I seldom use Universe D types, although there are a few lurking in my system someplace.

Regards,
Charlie Noah

Tiny Bear's Wild Bird Store
"Everything For The Backyard Bird Enthusiast, Except For The Birds"
Info, Forum:  http://www.TinyBearMarketing.com
Store:            http://Stores.TinyBearMarketing.com
Toll Free:       1-855-TinyBear (855-846-9232)

pat

unread,
Jun 8, 2012, 1:33:17 PM6/8/12
to jBASE
The Basic 'equivalent' of 'ITYPE()' for A correlatives can be achieved
using the 'OCONV()' function

eg :

@RECORD = item
@ID = 'my_id'

x = OCONV(item,"A;1:' * ':2")

[ Available from jBASE 4.1.6 onwards ]

Pat

foxy.md

unread,
Jun 9, 2012, 10:45:06 AM6/9/12
to jBASE
Thanks Pat,

it worked.

Tony Gravagno

unread,
Jun 9, 2012, 3:54:04 PM6/9/12
to jB...@googlegroups.com
> From: foxy.md alex.vulpe
>
> Thanks Pat,
> it worked.
> pat wrote:
> > x = OCONV(item,"A;1:' * ':2")


I'd really frown on OCONV(item,"A;1:' * ':2") if I saw it in code.
What's wrong with:
X=item<1>:"*":item<2>
?

If you're into reverse polish notation I can understand how an F
correlative might be appreciated there.

And I can understand something like this:
X = OCONV(item<2>,"A;N(VALUE)")
If the dict item VALUE had some complex calculation that you didn't
want to repeat in code. But without a reference to a file that's not
going to work.

But what do you get from a cryptic A-correlative that you don't get
in equally concise and more readable BASIC syntax?

T

Reply all
Reply to author
Forward
0 new messages