(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)
A simplified version of the handler could be:PD: ignore extra "\" on the string "Library version 1\.14\.58-7 on OS : "
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)
If you are getting a result different from the above could you specify Engine version and OS?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
CODE:
public handler calLibraryVersion() returns Stringvariable tOsSystem as Stringvariable 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 tOsSystemput 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 : " & tTestend handler
CODE:
public handler calLibraryVersion() returns Stringreturn "Library version 1\.14\.58-7 on OS : " & char 1 to 3 of the operating systemend handler
Statistics: Posted by lcwill — Sat Jul 13, 2024 4:04 pm