Access Run Functions from Red / System

So, a problem arose while experimenting with marshaling values ​​between Red and Red / System. I would like to access the guts of the object passed into the procedure.

I noticed that in Red Runtime there are functions for handling such things, get-values, get-words, etc. in the context of the object. There is a file in time sources calledobject.reds

How to use them? Can i use them? Is there a way to access them without re-including (and by compiling the extensions) a copy of the (already included) runtime in my application?

+4
source share
2 answers

/ . . :

Red []

get-object-size: routine [
    obj [object!]
    return: [integer!]
] [
    object/get-size obj
]

print get-object-size object [foo: 42 bar: 99]

, 2.

+2

/ (. ), context ! ( context! function!, a _ , ). context , actions , , . , , , , . , .

+1

All Articles