Promotic
WikipediaLinkedInYoutubeTwitterFacebook

return - statement of language JavaScript

Description:
Exiting the script (function) with the possibility of returning a value from this function.
Syntax:

return [value];

 
value (optional) Return value. Entering this value in the PROMOTIC system is relevant only for Pmg object methods (pouze tyto metody mohou vracet hodnotu).
Example1:
Conditional termination of script with no returned value:
Select and copy to clipboard

if (nVar > 0)
return;
Example2:
Conditional termination of script with returned value (in methods code on the "Methods" page):
Select and copy to clipboard

if (nVar > 0)
return nVar;

History:
Pm8.02.00: Created
PROMOTIC 9.0.4 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice