"I shall pass! through oh vile bucket of bits and bolts!"*
"R2107,238E" N5/8: "R" & CHR(33) & CHR(7) & CHR(35) & CHR(142) "R" & CHR(33) & CHR(7) & CHR(0) & CHR(35) & CHR(142) & CHR(0)
"Don't spout gibberish at me! and please! hexadecimal? Who do you think you are trying to put off here?"
@arr = (1, 2, 3); $arr_ref = \@arr;
$arr_ref2 = [1, 2, 3]; @arr2 = @$arr_ref2;
$item = $arr[0]; $item = $arr_ref->[0];
*"Oh I am so not impressed with you!"*integer, parameter :: last_number = 100
integer, dimension(last_number) :: numbers
integer :: i, number_of_primes, ac
! Initialize numbers array to 0, 2, 3, ..., last_number-- ! Zero instead of 1 because 1 is a special case. numbers = (/ 0, (ac, ac = 2, last_number) /)
do i = 2, last_number if (numbers(i) /= 0) then ! if this number is prime numbers(2*i : last_number : i) = 0 ! eliminate all multiples endif enddo
! Count the primes. number_of_primes = count (numbers /= 0)
! Gather them into the front of the array. numbers(1:number_of_primes) = pack(numbers, numbers /= 0)
! Print them print *, "There are ", number_of_primes, & " prime numbers less than", last_number print "(5i7)", numbers(1:number_of_primes)
*"Oh come on! I was doing fortran back when we had to punch every line into data cards and rems were a place keeping tool! And what prithee has any of this to do with anything? You let me post a couple of lines on Friday. Now you are going to allow my usual rambling forever long posts!"*