Pick random element: Difference between revisions
Content deleted Content added
Added NetLogo section |
|||
Line 265: | Line 265: | ||
=={{header|PicoLisp}}== |
=={{header|PicoLisp}}== |
||
<lang PicoLisp>(get Lst (rand 1 (length Lst)))</lang> |
<lang PicoLisp>(get Lst (rand 1 (length Lst)))</lang> |
||
=={{header|PL/I}}== |
|||
<lang PL/I> |
|||
declare t(0:9) character (1) static initial |
|||
('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j'); |
|||
put ( t(10*random()) ); |
|||
</lang> |
|||
output: |
|||
<pre> |
|||
e |
|||
</pre> |
|||
=={{header|PureBasic}}== |
=={{header|PureBasic}}== |
||
<lang PureBasic>Procedure.s pickRandomElement(List source.s()) |
<lang PureBasic>Procedure.s pickRandomElement(List source.s()) |