I think that we need some help here as the Proc documentation doesn't
explain this very well.
What is happening is that when PASS runs from the GOPASS Proc , the current
pointer in the input buffer is pointing at field 2 whereas it looks like it
is 1 on D3.
I suspect that PROCWRITE is supposed to rewind the pointer to the start of
the buffer but I cannot find any reference to this in the D3, UniVerse,
mvBase or Reality documentation.
Am I right? If not, what should be happening?
Martin Phillips
Ladybridge Systems Ltd
17b Coldstream Lane, Hardingstone, Northampton, NN4 6DB
+44-(0)1604-709200
Martin, I understand your thinking on this (don't change the
buffer unless the developer says so explicitly) but here's how I
think the other platforms see it. The base assumption is that
ProcWrite will overwrite the entire input buffer. If you're
pointing to a value in A3 now and you overwrite the entire
buffer, that value is no longer there - do you really want to
keep pointing at the same field? I'm also thinking a pre-set
pointer to a position beyond the end of buffer could result in
issues, depending on how each platform has it coded. While going
back to A1 may not be the preferred behaviour in all cases, it is
the commonly accepted default. I recommend resetting the QM
buffer to A1 on execution of ProcWrite.
It should also be noted that ProcRead assumes the entire input
buffer is present, not just the buffer starting with whatever is
set with Sx. So here again A1 seems to be a good default.
Marcos, your fall-through logic may be what you intend, where an
undefined value defaults to '1'. But in many cases that's not
what you'd want to do. This is why you hit "O 1" at label '1'.
I know this was just a sample case, but if your code does that
too, personally I'd modify that to return something like 'Invalid
Selection'.
HTH
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
Nebula R&D sells mv.NET and other Pick/MultiValue products
worldwide, and provides related development services
remove.pleaseNebula-RnD.com/blog
Visit PickWiki.com! Contribute!
> Reality also uses @AM as the buffer delimiter in PROC.
This is one of the differences between PQ and PQN type Procs. QM supports
both (and PQX though I don't know where that originated).
We will modify PROCWRITE to reset the buffer pointer. Tony's logic as to why
this is the right thing to do is sound even if this behaviour is not
documented.
Martin
This fix will be in release 2.9-7 (soon but no date set). It will be
necessary for programs that use PROCWRITE to be recompiled.
If necessary, a pre-build of the compiler can be provided for users of
release 2.9-6.