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
 
(3 intermediate revisions by 2 users not shown)
Line 5: Line 5:


<b>Example</b><br>
<b>Example</b><br>
<b>TRObject Syntax</b><br>
<pre>
<pre>
var
var
Line 21: Line 20:
   }
   }
}
}
</pre>
<b>Base Syntax</b><br>
<pre>
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;
</pre>
</pre>


<h2> See Also </h2>
<h2> See Also </h2>
* [[System_Library#System_Functions | System Functions]]
* [[Clomosy_Class#System_Function | System Functions]]
{{#seo:|title=AppPlatform in Clomosy - Clomosy Docs}}
{{#seo:|description=Learn to use the Clomosy.AppPlatform function to identify the platform your project runs on, with predefined values for different operating systems.}}

Latest revision as of 15:09, 24 December 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

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');
  }
}

See Also