Syntax

the systemVersion
the short systemVersion
the abbreviated systemVersion
the long systemVersion
the english systemVersion

put the systemVersion into field "OperatingSystemVersion"
put the platform && the long version into versionAndName

Explanation

The systemVersion function returns the version number of the computer’s operating system, as a floating point number (So version 5.2.1 becomes 5.0201.).

If you specify the english version, it will return the operating system version as a string, like 5.2.1.

If you instead qualify it as the long version, it will return the version number as a number of the form 0000MMmb, where MM is the major version, m the minor version, and b the bugfix version. E.g. macOS 10.7.5 would be 00001075.

Note: the systemVersion inherently depends on the platform SuperCard is running on. For example, macOS is currently at version 15.1, while Windows is at version 11.0, so if you are using the systemVersion to check whether the user has a new enough version of the OS for a certain feature, you will also have to look at the platform. Where possible, it is usually safer to look at the version property, as SuperCard tries to offer the same feature across platforms.

Note: while earlier versions of SuperCard represented version numbers like 5.6.8 as 5.68, SuperCard 5 and later report them as 5.0608. As SuperCard 4.x is limited to macOS 10.14 or older, and SuperCard 5 has a macOS 15 requirement, this should not matter, as 15 > 10, and it will not run on versions that would give a different result in version 5.x than they did in 4.x.

Warning: The long version is only offered as a compatibility mechanism for running HyperCard stacks, and is not recommended for use in new scripts, as it only supports one-digit minor and bugfix versions (so can’t correctly represent e.g. 10.13).

See Also