Octave style guide: Difference between revisions

Jump to navigation Jump to search
m
→‎Variable names: fix formatting
(→‎Whitespace: add style for arithmetic expressions)
m (→‎Variable names: fix formatting)
(One intermediate revision by the same user not shown)
Line 124: Line 124:


=== Variable names ===
=== Variable names ===
Avoid reusing the names of other functions as local variable names.  For
example, try to avoid naming local variables {{codeline|abs}},
{{codeline|log}}, or {{codeline|pow}}.  These functions may be used in a
later change and may lead to confusing errors.
An exception is the use of {{codeline|i}} and {{codeline|j}} as loop indices.
If a function has nothing to do with complex arithmetic, it is common and
acceptable to use {{codeline|i}} and {{codeline|j}} as local variables in
for loops.


== Quoted Strings ==
== Quoted Strings ==
296

edits

Navigation menu