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

So we have Omitted which can tell us if an optional parameter has been omitted or not, but when it comes to using ? (any) as a datatype in a parameter I cant find anything in the docs that tells me what the data type is.

We have something similar with Who, What, & Where but it just seems like there is this gap identifying the datatype in use unless I’m missing something in the help docs?

I can knock something up to identify the format of the datatype to work out if something is a string, cstring or pstring, but before I do this I thought I’d better check to make sure I’m not reinventing the wheel.


use a Search first :slight_smile:

Well this Procedure Overloading is different to what I had in mind but it should work. Thanks! :wink:

search Clarionhub for TUFO

A Proposed Convention for the Extended use of the Name Attribute - code - ClarionHub

Is it a bug that needs fixing?

If its a bug, come to any EU country as its perfectly legal to reverse engineer and fix said bug. The EU courts have already ruled on that in Oct 21.

Court of Justice of the European Union allows Reverse Engineering to Correct Errors - Lexology

This appears to be a bit of a laugh.
EUR-Lex - 32009L0024 - EN - EUR-Lex (

Section 14

A person having a right to use a computer program should not be prevented from performing acts necessary to observe, study or test the functioning of the program, provided that those acts do not infringe the copyright in the program.

When reading this! :roll_eyes:
The functionality of a computer program and the programming language cannot be
protected by copyright (

I’m curious with this statement

An undocumented structure is declared in and can be used to help with reflecting. An example of can be found at

What exactly is being referred to here when it says “undocumented structure”, which bit is it referring too, is the TUFO_CallInterface INTERFACE,TYPE what is being referred to as the undocumented structure or something else?

Essentially, that’s how it works, but it’s an internal process, and could potentially change at some point. Think if it as if you’re reaching in to access PRIVATE class data. Your code may work today, but the designer of the class may decide to change it without announcing it, so your code might break.

So when Bruce refers to Reflectors, he’s not referring to road safety reflectors or bike reflectors but to this definition Reflective programming - Wikipedia

So this now makes sense

Well the approach I was going to do was to try to do a regex on the memory layout, abit like overlay can fit over data in memory. I know the address and the size, so I was going to start there.

What other things are people looking to get out of the language? It mentions the dictionary properties, what sort of dct properties?

See use of the TUFO in the debuger classes

See .getVarType

So _Type is returning the datatype.

Line 1286 RETURN UFO._Type( ADDRESS(xaVar) )

and then the value returned can be looked up in

Does anyone know where the TUFO method/interface names originate from?

For example, I’m guessing [email protected] is the _Type referred to in the TUFO interface?

Did someone reverse engineer this, leak it or sit there painstakingly going through the shipping dll’s?

It looks like TUFO is linked to the procedures seen in the libmaker using ClaRun.dll with names like
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]


I’m also wondering if this _Type is like the typeid mentioned here.
typeid operator -

I think I’ve figured it out, ie getting the datatype from the ? (any) parameter passed by value.

Picture says a million lines of code…

Well this turned out to be a red herring. Back to the drawing board.

You’re welcome to play with my PrivateClass. It will get data types of passed *? parameters.

I’ve already written one which works for the params passed by address, but I was trying to get the data type for those passed by value and thought I was onto something but I wasnt!

GETTYPE.CLW (26.7 KB) (19.4 KB)

This is what is stumping me, I think I’ll have to use this in C11 and try to see what its fitting with and how, I’m assuming its fitting with something in the runtime.

So having loaded your app in C11, would I be correct in saying is a data structure, in the same sense as a Group, where the elements of the group are methods/procedures OVERed a part of the clarion runtime in memory, which is located and fixed over the runtime using Address() and What()?

If so, I can see why the comment exists that state this can change with future updates of the runtime.

This is what I thought I was looking at the other night which my GetType class but was stupidly looking back at the variable contents in memory of the procedure, aka my red herring.

Anyway I’m right, I’ll have a go at backporting this to C6 and see what differences exist in the two runtimes I have here.

This is why ASLR and other methods exists to jumble up the memory…

Its also why Astrings could perhaps be viewed as the haystack in which to hide a needle.

An interface is kind of just a set of methods that a class will support.

In c6, there was a different interface, where the methods appeared in a different order

Yeah its a bit like a vertical key, so for now, my interface in C6 looks like this, and then I’ll see what happens with each method, so I should end up with the correct number of methods, the one’s that accept input and the one’s that have output including the datatype.

Its a bit like picking a barrel lock if you have ever watched LockPickingLawyer - YouTube! :roll_eyes:

iWTF    Interface,Type
p1      Procedure(long),long
p2      Procedure(long),long
p3      Procedure(long),long
p4      Procedure(long),long
p5      Procedure(long),long
p6      Procedure(long),long
p7      Procedure(long),long
p8      Procedure(long),long
p9      Procedure(long),long
p10     Procedure(long),long
p11     Procedure(long),long
p12     Procedure(long),long
p13     Procedure(long),long
p14     Procedure(long),long
p15     Procedure(long),long
p16     Procedure(long),long
p17     Procedure(long),long
p18     Procedure(long),long
p19     Procedure(long),long
p20     Procedure(long),long
p21     Procedure(long),long
p22     Procedure(long),long
p23     Procedure(long),long
p24     Procedure(long),long
p25     Procedure(long),long
p26     Procedure(long),long
p27     Procedure(long),long
p28     Procedure(long),long
p29     Procedure(long),long
p30     Procedure(long),long
p31     Procedure(long),long
p32     Procedure(long),long
p33     Procedure(long),long
p34     Procedure(long),long
p35     Procedure(long),long

I think there are a couple of renditions on the news server somewhere.

I’m not going on the newsgroups, I’ll work this out myself, even if it becomes the death of me!