How to determine the passed Data Type in a ? (any) parameter?

I think I found a tiny bit more on the origins of TUFO
www.attryde.com/clarion/binary/tswd.txt

(*  new types for clarion *)

    Decimal,
    Pdecimal,
    Bfloat,
    UFO,
    DynDecimal,
    DynPdecimal,

UFOs had been completely rewritten for future versions of Clarion. Any program bound to some particular implementation of ANY can become unusable. The same is for binding to other RTL internal structures, e.g. so called “type descriptor string” for GROUPs/QUEUEs/CLASSes/RECORDs.

1 Like

Can we please get UFOs and the TUFO interface documented.
I asked Z for that at a recent Florida CIDC, and he agreed it would be a good idea.

How should one define recent?

I believe it was the most recent Florida CIDC

2019? Recent seems so long ago.

I do not think that it is a good idea to make the internal structure of UFOs public. If you need to know how UFOs are organized, something is wrong with your program design. On the other hand, I’m not RZ.

I agree for the most part. However it can be useful to determine the type of variable passed into an *? argument. Possibly there are one of two other methods that developers have found useful in TUFO.

That’s fine with me, but providing a supported facility that could return the data type and address of the buffer (etc) would be nice.

Unless you’re writing RTCall or xlib. :slight_smile:

I, for one, have never seen you in the same room.

UFO allows doing Reflection or Introspection and know the Type. As can be done in .Net.

Not for use in Production code but during Development. I can have generic Reflection code to view any Class or Queue or Group. So when testing I have an idea what Class Data should be or Queue data. I can display the data to confirm it matches my understanding. Most of that can be done with WHO and WHAT, but UFO adds Type that is nice to know.

This free class allows viewing any Class, Queue, Group.


Using the new LIST From Address Property (7A23h) I can view the Queue for any LIST. Very handy to confirm the not visible stuff in the Q like Hot fields, Styles, Colors.

UFOs are wider than ANY. For example, the Application Generator uses special variants of UFOs during “executing” templates.

RTCall didn’t use any CW internals. It was the stuff to call a function with parameters if known its address and the prototype. Later the simpler method to do this was found which used knowledge how the linker works. And finally reference variables of procedural types had been introduced in the language.

XLib was written by the order before I joined TopSpeed and I never used it myself.

+1. [Post must be at least 20 characters]

Edit. I will add it is possible to use RegEx to workout some datatypes, like string and cstring, but I’ve not coded the data type discovery fully yet. However windows datastructures can be discovered and worked out by using just a string, which makes things easier, for data manipulation, but it ruins some types of security measures.