Subtracting Roi property values

Hello this might be a silly question, but I’m at a lost at how to search for the right way to do this.
I want to find the difference between the values of properties assigned to Rois. In other words, property 2 - property1 = difference. Using the ‘-’ symbol is not working. Do I have to convert the properties from strings to integers?
I have an example macro code illustrates what I’m trying to do. Thanks in advance for any suggestions!

requires("1.48h");
run("Blobs (25K)");
run("Stack to Images");
run("Threshold...");
run("Convert to Mask");
run("Despeckle");
run("Dilate");
run("Analyze Particles...", "  show=Outlines display exclude summarize add");
for(ifd=0; ifd <roiManager("count"); ifd++){
	roiManager("Select", ifd);
	Roi.setProperty("pos 1", 50);
	Roi.setProperty("pos 2", 100);
}
for(ifd=0; ifd <roiManager("count"); ifd++){ //blobcount might be 2x times as much
	roiManager("Select", ifd);
	print("calculating IFD of " + Roi.getName());
	pos1 = Roi.getProperty("pos 1");
	pos2 = Roi.getProperty("pos 2");
	print(pos2 + " minus "+pos1);
	IFD = (pos2 - pos1); // error here
	// not sure what symbol to use
	print(IFD);
}

Yes.

From the macro functions documentation:

Roi.getProperty(key)

Returns the value (a string) associated with the specified key
or an empty string if the key is not found.

This function returns a string value. To interpret it as a number, you’ll have to use the parseFloat or parseInt functions:

IFD = (parseFloat(pos2) - parseFloat(pos1));

Thanks. That works, that’s very helpful.