(I'm assuming you are on mac)
Ignore extra "\" on the strings with "."
The expected result for your handler would be:
"Library version 1\.14\.58-7 on OS : mac"
(Taken from the Dictionary)
Returns a string describing the operating system that LiveCode is running on. The possible values are:
"windows" - 32-bit and 64-bit Windows
"mac" - Desktop OS X
"ios" - iOS (iPhone and iPad)
"android" - Android Linux devices
"linux" - All other Linux platforms
If you are getting a result different from the above could you specify Engine version and OS?
Code: Select all
public handler calLibraryVersion() returns String
variable tOsSystem as String
variable tTest as String
/* If running on macOS you are putting "mac" inside tOsSystem */
put the operating system into tOsSystem
/* You could also directly do here:
* put char 1 to 3 of tOsSystem into tTest
*/
get char 1 to 3 of tOsSystem
put the result into tTest
/* You could also directly do like:
* return "Library version 1\.14\.58-7 on OS : " & char 1 to 3 of tOsSystem
*/
return "Library version 1\.14\.58-7 on OS : " & tTest
end handler
A simplified version of the handler could be:
Code: Select all
public handler calLibraryVersion() returns String
return "Library version 1\.14\.58-7 on OS : " & char 1 to 3 of the operating system
end handler
PD: ignore extra "\" on the string "Library version 1\.14\.58-7 on OS : "