dbTalk Databases Forums  

Tutorial on I-Descriptors

comp.databases.pick comp.databases.pick


Discuss Tutorial on I-Descriptors in the comp.databases.pick forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
None
 
Posts: n/a

Default Re: Tutorial on I-Descriptors - 03-08-2006 , 09:11 AM







Quote:
I guess I'm really looking for more examples of what goes on line 2 of
the I descriptor, in standard and unusual cases.
The QM I-type compiler allows just about anything that you can do in
the expression on the right hand side of a Basic assignment. The few
things that are not valid are usually omitted simply because they don't
make sense in an I-type. The data item names used in the expression
must correspond to other items defined in the same dictionary. These
can include othe I-type items.

Where one I-type references another, the nesting is performed at
compile time, not as a subroutine call at run time. This gives a
significant performance advantage but does require that you think
carefully about the impact of changes to the inner I-type. The simplest
thing is to use the CD command to compile every I-type in the
dictionary after a change.

We have extended the language to make it possible to do some things in
the I-type where you would have to execute a subroutine on other
platforms. For example, we have a function call version of LOCATE()
that returns the position value. The SUBSTITUTE() function was
developed to simplify something that actually turns out to be very
difficult without it.

Getting data from another file is doen using TRANS(). Unlike other
environments, our TRANS() is quite happy to bring back a value that is
itself an I-type and hence you can follow a link through a chain of
files (though think carefully about whether this is a sensible thing to
be doing!).

If you get into the delights of compound I-types (multiple semicolon
separated expressions evaluated one after the other), note that QM is
happy to nest compound I-type references so there should be no
restrictions on which items you can access.

If you decide that what you are trying to do is just too complex in an
I-type, you can call a Basic subroutine with SUBR("name") or
SUBR("name", arg1, arg2, ...). This subroutine must return a result via
its first argument just like a function. The called subroutine has
access to the full Basic programming language though there are some
things that might cause problems. For example, if the I-type is being
executed as part of a query, the subroutine cannot do a query processor
SELECT as nested queries are not supported.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.