Sometimes it's useful to collect all the global property values at a certain point in the execution of the protocol and write them out to a file for debugging or other purposes. This can easily be done with this small snippet of PilotScript:
#globals := rglobalpropertynames('.*');
foreach #global in #globals loop
property(#global) := globalproperty(#global);
end loop;
This script will loop through all the global properties defined at that point in the execution and for each of them will create a property on the data record that holds the value of the global with the same name.
