Get Your Premium Membership

Program Sonnet

Program Sonnet
Integer, Parameter:: L=14, S=10
!L number of lines, S number of syllables per line
Character (Len=6):: Syl(L, S)
Character (Len=80):: Line (L)
Do I=1,L
	Do J=1,S
    	Syl(I,J)= 
! here is where you insert 
! the poetic thought the computer 
!cannot produce
	Enddo
Enddo

Do I=1,L
	Line(I)=Syl(I,1)
	Do J=2,S
		Line(I)=trim(Line(I))//trim(Syl(I,J)) 
	Enddo
Enddo
! If you want a rhyming sonnet, start subroutine rhyme

If (line.eq.good) then
	Keep
Else
	Revise
Endif

Do I=1,L
	Write (*,*) Line(I)
Enddo

End Program Sonnet


! October 16, 2018
! For contest all 'dim ones and zeros- A programming contest
! Sponsored by Brahn Bailey

Copyright © | Year Posted 2018




Post Comments

Poetrysoup is an environment of encouragement and growth so only provide specific positive comments that indicate what you appreciate about the poem. Negative comments will result your account being banned.

Please Login to post a comment

Date: 10/19/2018 11:23:00 PM
Way over my head but I like it, Agnes.
Login to Reply
Date: 10/18/2018 9:45:00 PM
A [Agnes] =MC squared...lovely equations of mathematical poetry my friend...a game of Tron perhaps lol...love & light...^WW^
Login to Reply
Date: 10/18/2018 11:42:00 AM
- Awesome !!! - Love it, Agnes :) - The best I have read for a long time ... good luck in the contest - hugs // Anne-Lise :)
Login to Reply
Date: 10/18/2018 8:21:00 AM
I am in awe of your creativity Agnes, this theme is beyond my comprehension! Good luck in the contest:-) hugs Jan xx
Login to Reply
Krampe Avatar
Agnes Krampe
Date: 10/18/2018 8:38:00 AM
Thanks, Jan - it's just a Fortran code that writes a sonnet if you input the syllables :)
Date: 10/17/2018 8:38:00 PM
I agree with Nina! ;D Very clever & fun!
Login to Reply
Krampe Avatar
Agnes Krampe
Date: 10/18/2018 8:38:00 AM
Thanks, Rhona.
Date: 10/17/2018 4:17:00 PM
That was pretty cool Agnes. :)
Login to Reply
Krampe Avatar
Agnes Krampe
Date: 10/18/2018 8:39:00 AM
Thanks, Chris.

Book: Radiant Verses: A Journey Through Inspiring Poetry