[comp.sys.mac.hypercard] ExtToStr/StrToExt XCMD programming question

holla@eedsp.eedsp.gatech.edu (Craig Hollabaugh) (03/01/90)

I am having a terrible time with ExtToStr/StrToExt glues. here is my simple
script. convert zero > pas > ext > pas > zero. but it doesn't work, the        
result isn't even close to parameter 1.

can someone help me?


unit traceunit;
interface
	uses
		XCmdIntf, XCmdUtils;

	procedure main (paramptr: XCmdPtr);

implementation

	procedure trace (paramptr: XCmdPtr);
		var
			myext: Extended;
			str: Str255;
			mystr: str31;

	begin
		ZeroToPas(paramptr, paramptr^.params[1]^, str);

		myext := strtoext(paramptr, str);

		str := exttostr(paramptr, myext);

		paramPtr^.returnValue := PasToZero(paramptr, str);
	end;


	procedure main;
	begin
		trace(paramptr);
	end;

end.