Permalink
Browse files

Added code formatting tags for eScript code to escript.inc for my pre…

…vious documentation addition. I think this will work.
  • Loading branch information...
Hope-Lives committed Jan 11, 2019
1 parent 780d464 commit 46bb89e2b5d66e912d7c9fd1547c91a875d564c1
Showing with 6 additions and 3 deletions.
  1. +6 −3 docs/docs.polserver.com/pol100/include/escriptguide.inc
@@ -437,14 +437,17 @@ function requires it. <br><br>
<p>Suppose you want to find out if the value in the variable "name" exists in
an array named "people". You can do something like the following to:<br>

foreach person in people
<div class="doc-guide-pre">
<pre>foreach person in people
if(person == name)
return _person_iter;
endif
endif</pre></div>

or you can do something even simpler:<br>

var in_array := name in people;
<div class="doc-guide-pre">
<pre>
var in_array := name in people;</pre></div>

in_array will be set to the ordinal position where the value in name exists
in the array or if it is not in the array in_array will be set to 0.<br><br>

0 comments on commit 46bb89e

Please sign in to comment.