Algorithm-Step

 view release on metacpan or  search on metacpan

lib/Algorithm/Step.pm  view on Meta::CPAN

	step 1,2, "desc";
	step 2, "desc";

=item B<statistics>

Print the execution information. If no argument is give,
print to stdout. If a filename is given, print to that file.

	statistics("prime.stat");

The output looks like:

  STATISTICS

  Algorithm P: Print table of 500 primes
  STEP 1. Start table, PRIME[1] <- 2, PRIME[2] <- 3 .... [1]
  STEP 2. Advance n by 2 ............................... [1784]
  STEP 3. k <- 1 ....................................... [1784]
  STEP 4. Increase k ................................... [9538]
  STEP 5. Divide n by PRIME[k] ......................... [9538]
  STEP 6. Remainder zero? .............................. [9538]
  STEP 7. PRIME[k] large? .............................. [8252]
  STEP 8. n is prime ................................... [498]
  STEP 9. Print result ................................. [1]

=back

=head1 TODO

Generate from comments. If a file `prime.pl' looks like:

	...

	# algorithm P: Print first five hundred primes

	# step 5: Divide n by PRIME[k]

	# end algorithm P

	...



( run in 0.524 second using v1.01-cache-2.11-cpan-64827b87656 )