Skip to main content
Copy edited. Added some context. Removed meta information.
Source Link

I'd use the following (consensusthe consensus here):

if (condition) {
    any_number_of_statements;
}

Also possible:

if(condition) single_compact_statement;

Not so good, especially in C/C++-like languages:

if(condition) 
    single_compact_statement;

(noNo choice here in PythonPython ;-)


In PerlPerl, you'd use:

$C = $A**3 if $A != $B ;$B;

or

$C = $A**3 unless $A == $B ;$B;

(thisThis is not pseudocode ;-)

Regards

rbo

I'd use the following (consensus here):

if(condition) {
   any_number_of_statements;
}

Also possible:

if(condition) single_compact_statement;

Not so good, especially in C/C++-like languages

if(condition) 
   single_compact_statement;

(no choice here in Python ;-)


In Perl, you'd use:

$C = $A**3 if $A != $B ;

or

$C = $A**3 unless $A == $B ;

(this is not pseudocode ;-)

Regards

rbo

I'd use the following (the consensus here):

if (condition) {
    any_number_of_statements;
}

Also possible:

if(condition) single_compact_statement;

Not so good, especially in C/C++-like languages:

if(condition) 
    single_compact_statement;

(No choice here in Python ;-)


In Perl, you'd use:

$C = $A**3 if $A != $B;

or

$C = $A**3 unless $A == $B;

(This is not pseudocode ;-)

Post Made Community Wiki by user36294
comma added
Source Link

I'd use the following (consensus here):

if(condition) {
   any_number_of_statements;
}

Also possible:

if(condition) single_compact_statement;

Not so good, especially in C/C++-like languages

if(condition) 
   single_compact_statement;

(no choice here in Python ;-)


In Perl, you'd use:

$C = $A**3 if $A != $B;$B ;

or

$C = $A**3 unless $A == $B ;

(this is not pseudocode ;-)

Regards

rbo

I'd use the following (consensus here):

if(condition) {
   any_number_of_statements;
}

Also possible:

if(condition) single_compact_statement;

Not so good, especially in C/C++-like languages

if(condition) 
   single_compact_statement;

(no choice here in Python ;-)


In Perl, you'd use:

$C = $A**3 if $A != $B;

or

$C = $A**3 unless $A == $B

(this is not pseudocode ;-)

Regards

rbo

I'd use the following (consensus here):

if(condition) {
   any_number_of_statements;
}

Also possible:

if(condition) single_compact_statement;

Not so good, especially in C/C++-like languages

if(condition) 
   single_compact_statement;

(no choice here in Python ;-)


In Perl, you'd use:

$C = $A**3 if $A != $B ;

or

$C = $A**3 unless $A == $B ;

(this is not pseudocode ;-)

Regards

rbo

Source Link

I'd use the following (consensus here):

if(condition) {
   any_number_of_statements;
}

Also possible:

if(condition) single_compact_statement;

Not so good, especially in C/C++-like languages

if(condition) 
   single_compact_statement;

(no choice here in Python ;-)


In Perl, you'd use:

$C = $A**3 if $A != $B;

or

$C = $A**3 unless $A == $B

(this is not pseudocode ;-)

Regards

rbo