Re: Randomly outputting an array



Richard Heathfield wrote:
John W. Krahn said:

Richard Heathfield wrote:
<snip>
Converting to a sensible language is left as an exercise.
#!/usr/bin/perl

Oy! I said a *sensible* language. ;-)

Hey, at least Perl has a built-in way to swap two elements of
an array without copying one to a temporary variable. Kinda
useful when what you're doing primarily consists of swapping
elements in an array... ;-)

- Logan
.



Relevant Pages

  • Re: Tips for spreadsheet like application
    ... pointer() array and the dataarray is not changed. ... because most sort algorithms otherwise end up swapping the contents ... understanding much of lua - what I did understand was quite impressive. ...
    (comp.sys.acorn.programmer)
  • Re: Tips for spreadsheet like application
    ... Well, APL is excellent for matrix stuff, but I dunno if there's a RO ... Large amounts of data: do you mean larger than you can hold in a wimpslot, ... array and the dataarray is not changed. ... because most sort algorithms otherwise end up swapping the contents ...
    (comp.sys.acorn.programmer)
  • Re: fastest way to change case of string
    ... using the same approach, swapping only the BSTR-Pointers. ... but couldn't find a fast way to write the array to a Recordset. ... There are no "RowPointers" in such a scenario, wich could be swapped ... wich acts as an additional layer of indirection. ...
    (microsoft.public.vb.general.discussion)
  • Re: One algorithm problem
    ... We have to arrange the elements in array A as they are in B (by ... swapping values) with the place in A holding the digit '0' used as ... and doesn't use any extra variable space. ... struct and B is an array of keys used in structs of A,,then??? ...
    (comp.lang.c)
  • Re: What is wrong with my program?
    ... the lab requires me that I can't use the classes that ... implement the Collection interface, except for Array class." ... I'd kinda like to see the course title and synopsis. ...
    (comp.lang.java.help)