From Clomosy Docs

(Created page with "<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert"> function Clomosy.AppPlatform :Integer; </div> The platform on which the project is opened is returned. A return value of 0 indicates Windows, 1 indicates MacOS, 2 indicates iOS, 3 indicates Android, 4 indicates WinRT, and 5 indicates Linux.<br> <b>Example</b><br> <b>TRObject Syntax</b><br> <pre> var platformStatus : Integer; { platformStatus = Clomosy.AppPlatfo...")
 
No edit summary
Line 40: Line 40:


<h2> See Also </h2>
<h2> See Also </h2>
* [[System_Library#System_Functions | System Functions]]
* [[Clomosy_Class#System_Function | System Functions]]

Revision as of 14:15, 14 October 2024

The platform on which the project is opened is returned. A return value of 0 indicates Windows, 1 indicates MacOS, 2 indicates iOS, 3 indicates Android, 4 indicates WinRT, and 5 indicates Linux.

Example
TRObject Syntax

var
  platformStatus : Integer;
{
  platformStatus = Clomosy.AppPlatform;
  case platformStatus of
  {
    0 : ShowMessage('Windows');
    1 : ShowMessage('MacOS');
    2 : ShowMessage('IOS');
    3 : ShowMessage('Android');
    4 : ShowMessage('WinRT');
    5 : ShowMessage('Linux');
  }
}

Base Syntax

var
  platformStatus : Integer;
begin
  platformStatus := Clomosy.AppPlatform;
  case platformStatus of
    0 : ShowMessage('Windows');
    1 : ShowMessage('MacOS');
    2 : ShowMessage('IOS');
    3 : ShowMessage('Android');
    4 : ShowMessage('WinRT');
    5 : ShowMessage('Linux');
  end;
end;

See Also