Click here to Skip to main content
15,887,676 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Java Syntax

VB
// confirmaction returns true to exit or false to continue/error
if (ConfirmAction(decision) == false)


is that the correct syntax for the loop?
is ConfirmAction a var or a command?
Posted

1 solution

Winter_Walk wrote:
is that the correct syntax for the loop?

Yes. It can be shortened though:
if (!ConfirmAction(decision))

This is the same as saying "If ConfirmAction(decision) is NOT true".

Winter_Walk wrote:
is ConfirmAction a var or a command?

In this case, ConfirmAction is a method (command, as you say), which either returns true or false depending on the argument you pass to it.
You can't pass arguments (in this case "decision") to a variable.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900