DISKSPACE returns the amount of free disk space on the current drive. If you wish to check for the free space on drives with over 2 gigs of free you must use syntax similar to this:
SET VAR vSpace DOUBLE = (ISTAT('DISKSPACE'))
This is necessary because the default datatype, INTEGER, cannot hold the required number of digits to report over 2 gigs of free space.
When depending on this routine it is best to test it on a platform as close to your target platform as possible.