From Clomosy Docs

No edit summary
No edit summary
 
(4 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert">
<div class="alert alert-ligth border border-3 border-primary-subtle rounded-5 p-4 shadow-sm" role="alert">
function Clomosy.Ask(var AAskMessage:String): Boolean;
function Clomosy.Ask(var AskMessage:String): Boolean;
</div>
</div>


Line 12: Line 12:


<b>Example</b><br>
<b>Example</b><br>
<b>TRObject Syntax</b><br>
 
<pre>
<pre>
{
{
Line 20: Line 20:
     ShowMessage('No');
     ShowMessage('No');
}
}
</pre>
<b>Base Syntax</b><br>
<pre>
begin
  if Clomosy.Ask('Do you like Clomosy?') then
    ShowMessage('Yes');
  else
    ShowMessage('No');
end;
</pre>
</pre>


<h2> See Also </h2>
<h2> See Also </h2>
* [[System_Library#Input-Output_Functions | Input Output Functions]]
* [[System_Library#Input-Output_Functions | Input Output Functions]]
{{#seo:|title=Ask Using in Clomosy - Clomosy Docs}}
{{#seo:|description=Clomosy.Ask shows a confirmation dialog, returning true if 'Yes' is clicked, otherwise false. For cross-platform use, switch to AskAndCall.}}

Latest revision as of 11:54, 8 January 2025

The "Ask" function is commonly used in Clomosy programming to display a dialog box where you can request user confirmation. You can use this function to ask a question or present options to the user.

By using "Clomosy.Ask," you can input a specific question. If the "Yes" button is clicked, the function returns a value of true. Otherwise, it returns false, allowing you to perform the desired operations.

Example

{
  if Clomosy.Ask('Do you like Clomosy?')
    ShowMessage('Yes');
  else
    ShowMessage('No');
}

See Also