Scripting Basics: Difference between revisions

From San Andreas Multiplayer
Jump to navigationJump to search
No edit summary
Tag: Reverted
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
<pre>
<syntaxhighlight lang="php" line>
{{Replace {{{code|}}}
def quick_sort(arr):
  | {{#replace: {{{code}}}
less = []
      | old=public
pivot_list = []
      | new=<span class="pawn-keyword">public</span>
more = []
      | old=private
if len(arr) <= 1:
      | new=<span class="pawn-keyword">private</span>
return arr
      | old=if
else:
      | new=<span class="pawn-keyword">if</span>
pass
      | old=else
</syntaxhighlight>
      | new=<span class="pawn-keyword">else</span>
      | old=for
      | new=<span class="pawn-keyword">for</span>
      | old=while
      | new=<span class="pawn-keyword">while</span>
      | old=return
      | new=<span class="pawn-keyword">return</span>
      | old="//"
      | new=<span class="pawn-comment">//</span>
      | old="\"(.*?)\""
      | new=<span class="pawn-string">"$1"</span>
      | old="\w+\s*\(.*?\)"
      | new=<span class="pawn-function">$0</span>
    }}
  | Keine Code-Angabe gefunden.
}}
</pre>

Latest revision as of 13:00, 3 November 2024

def quick_sort(arr):
	less = []
	pivot_list = []
	more = []
	if len(arr) <= 1:
		return arr
	else:
		pass