[comp.sys.apollo] vfmt_${ws,encode,write}

kjb@zycad.UUCP (10/31/87)

I just spend a day debugging a problem when using the vfmt calls.
When encoding or writing a string they seem to blow up if given a
string and a corresponding length of zero.  They do not write a
zero length string as I would expect.  Has anyone else encountered
this, or am I doing something wrong?

For example

	string_length := 0;
	string { has some data}

	vfmt_$ws2('%2x%a%.',
		  string,
		  string_length);

The call just seems to ignore the length and writes as much garbage as it
can.  If it makes any difference, this call is in a loop and for the previous
iteration of the loop it is given a non-zero length for the string.
Does it remember that length?   I believe I have another occasion in my test
case when the loop is entered and the length is zero every interation and
this seems to work just fine.
-- 
Kevin Buchs   3500 Zycad Dr. Oakdale, MN 55109  (612)779-5548
Zycad Corp.   {rutgers,ihnp4,amdahl,umn-cs}!meccts!nis!zycad!kjb