Converse agora com nosso suporte
Chat com o suporte

Privilege Manager for Unix 7.0 - Administration Guide

Introducing Privilege Manager for Unix Planning Deployment Installation and Configuration Upgrade Privilege Manager for Unix System Administration Managing Security Policy The Privilege Manager for Unix Security Policy Advanced Privilege Manager for Unix Configuration Administering Log and Keystroke Files InTrust Plug-in for Privilege Manager for Unix Troubleshooting Privilege Manager for Unix Policy File Components Privilege Manager for Unix Variables
Variable names Variable scope Global input variables Global output variables Global event log variables PM settings variables
Privilege Manager for Unix Flow Control Statements Privilege Manager for Unix Built-in Functions and Procedures
Environment functions Hash table functions Input and output functions LDAP functions LDAP API example List functions Miscellaneous functions Password functions Remote access functions String functions User information functions Authentication Services functions
Privilege Manager for Unix programs Installation Packages

continue

Syntax
continue;
Description

Use the continue statement in the body of a C-style for loop, while, or do-while statement to skip the rest of the statements in the body of the loop and start again from the top of the loop.

Example
for ( oneuser in userlist ) 
{ 
   if (oneuser == "root") 
   { 
      continue; 
   } 
      print(oneuser); 
}

do-while

Syntax
dostatement while ( expression ) ;
Description

The do-while statement is a looping statement. It repeatedly runs the specified statement until the specified expression evaluates to false (the value 0) or it encounters a break statement.

The specified statement runs at least once (unlike the while statement, which may terminate immediately).

Use a statement block in the form { statement ... } to run multiple statements in the loop. One Identity recommends using a statement block for readability.

Examples

This prints the values 1,2,3,4,5:

x=1; 
do print(x++); while (x <= 5);

This prints the values 1,2,3,4,5 using a statement block:

x = 1; 
do { 
   print(x); 
   x++; 
} while (x <= 5);

This prints the values 1,2,3 because the break statement terminates the loop:

x=1; 
do { 
   if (x > 3) break; 
   print(x++); 
} while (x <= 5);

for loop

Syntax
for ControlValue = StartValue to StopValue
[step increment] { initializer statements ; conditional expression ; update expression ; initializer statements ; conditional expression ; }
Description

The for statement is a looping statement. It runs one or more initializer statements and then evaluates the conditional expression. Use a comma to separate multiple initializer statements. If the conditional expression evaluates to true (any non-zero value), then it runs the specified statement. It runs the update expression (if present) immediately after it runs the specified statement. The for statement is terminated if the conditional expression evaluates to false (the value 0), or it encounters a break statement.

Typically, a for statement contains one initializer statement, a conditional expression, and an update expression that all operate on the same variable.

Use a statement block in the form { statement ... } to run multiple statements. One Identity recommends using a statement block for readability.

Examples

This prints the values 1,2,3,4,5:

for (x = 1; x <= 5; x++) print(x);

This prints the values 1,2,3,4,5. (Note that this example does not have an update expression and it uses a statement block):

for (x = 1; x <= 5; ) { 
   print(x); 
   x++; 
}

This prints the values 1,2,3 because the break statement terminates the loop:

for (x = 1; x <= 5; x++) { 
   if (x > 3) break; 
   print(x); 
}

for loop

Syntax
for (variable in expression ) statement
Description

The for statement is a looping statement. The specified expression must be an array. It runs the specified statement once for each array element, and assigns it to the specified variable in turn. The for statement terminates when the specified expression does not evaluate to an array value, either when each element of the array has been iterated, or it encounters a break statement.

Use a statement block in the form { statement ... } to run multiple statements. One Identity recommends using a statement block for readability.

Examples

This prints the values 1,2,3,4,5:

for (x in {1,2,3,4,5}) print(x);

This does not print any value, since the expression does not evaluate to an array:

for (x in "foo") print(x);

This prints the values 1,2,3 because the break statement terminates the loop:

values = {1,2,3,4,5}; 
for (x in values) { 
   if (x > 3) break; 
   print(x); 
}
Documentos relacionados

The document was helpful.

Selecione a classificação

I easily found the information I needed.

Selecione a classificação