I had a first look at the final corrigendum 1 of MHEG-5 as published on Tom
Casey's site.
I still have a question on how to interpret section 7.1 of this corrigendum
which seems not clear to me :
7.1.1 says :
"Values are to be returned in variables. There are *two* methods possible
how to pass the variables to the called program. One is call-by-value of
the content (i.e. an objectReference to the variable is passed), the other
is call-by-reference (i.e. the variable is directly passed to the program)"
then 7.1.2 only says that output parameters shall have the indirectRef
option encoded.
My questions are :
- Which of the 2 methods mentioned at 7.1.1 is described by 7.1.2 :
call-by-value or call-by-reference ?
- What about the other method ? How should it be encoded ?
- Could we have examples illustrating the 2 methods and their syntax ? I.e.
"the variable is passed directly" seems not clear to me. How do you pass a
variable directly.
Based on how all other elementary actions using GenericValues are
functionning, it was quite clear to me that, (for instance with an integer)
a GenericInteger parameter has the following options :
- an integer value is passed directly to the elementary action (for instance 3)
- a integer variable is used and the indirectRef option shall be encoded,
meaning that the values stored in variable is passed, not the variable
itself or its objectRef.
As values are to be returned in variables with call (and fork) action, it
seems also quite clear to me that the only type possible for output
parameters was NewGenericObjectRef, ie passing the objectRef to the
variable that will get the returned value.
Now that 7.1.2 says that IndirectRef must be encoded, should I understand
that I have to store the objectRef of the variable that will get the
returned value in another variable (an objectRefVar) and pass an
indirectRef to this new likely useless objectRef var or am I completely
misunderstanding the corrigendum here ?
Also, I don't see how other type of variable could be used for pointing on
the variable that should get the returned value. Please enlighten me.
Best regards,
__________________________________________________________________
Emmanuel BEUQUE mailto:ebeuque@pratique.fr
MediaServ tel: +33 (0) 2 99 64 35 64
Multimedia consultant & developer fax: +33 (0) 2 99 64 36 65