write(6,*) 'Feliz cumpleaños @EvilDragon.'
209 write(6,*) 'Want some cake?: (1)Sure (2)Nah'
read(5,*) ipr2
if(ipr2.lt.1) then
write(6,*) 'Error!'
goto 209
endif
if(ipr2.gt.2) then
write(6,*) 'Error!'
goto 209
endif
if(ipr2.lt.2) then
write(6,*) ' 0 0'
write(6,*) ' | |'
write(6,*) ' ____|___|____'
write(6,*) ' 0 |~ ~ ~ ~ ~ ~| 0'
write(6,*) ' | | | |'
write(6,*) ' ___|__|___________|___|__'
write(6,*) ' |/\/\/\/\/\/\/\/\/\/\/\/|'
write(6,*) ' 0 | F e l i z | 0'
write(6,*) ' | |/\/\/\/\/\/\/\/\/\/\/\/| |'
write(6,*) ' _|___|_______________________|___|__'
write(6,*) '|/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|'
write(6,*) '| |'
write(6,*) '| C u m p l e a ñ o s |'
write(6,*) '| |'
write(6,*) '| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |'
write(6,*) '| |'
write(6,*) '| @EvilDragon! ! ! |'
write(6,*) '| |'
write(6,*) '|/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|'
write(6,*) '|___________________________________|'
endif
end
48617070792042697274686461792C204544
$ perl -E 'say pack("H*","48617070792042697274686461792C204544")'
Happy Birthday, ED
Wait, you can do (5,*) and (6,*)? I did (*,*) for both read and write.Let's add a bit of old school style...:
Code:write(6,*) 'Feliz cumpleaños @EvilDragon.' 209 write(6,*) 'Want some cake?: (1)Sure (2)Nah' read(5,*) ipr2 if(ipr2.lt.1) then write(6,*) 'Error!' goto 209 endif if(ipr2.gt.2) then write(6,*) 'Error!' goto 209 endif if(ipr2.lt.2) then write(6,*) ' 0 0' write(6,*) ' | |' write(6,*) ' ____|___|____' write(6,*) ' 0 |~ ~ ~ ~ ~ ~| 0' write(6,*) ' | | | |' write(6,*) ' ___|__|___________|___|__' write(6,*) ' |/\/\/\/\/\/\/\/\/\/\/\/|' write(6,*) ' 0 | F e l i z | 0' write(6,*) ' | |/\/\/\/\/\/\/\/\/\/\/\/| |' write(6,*) ' _|___|_______________________|___|__' write(6,*) '|/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|' write(6,*) '| |' write(6,*) '| C u m p l e a ñ o s |' write(6,*) '| |' write(6,*) '| ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ |' write(6,*) '| |' write(6,*) '| @EvilDragon! ! ! |' write(6,*) '| |' write(6,*) '|/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|' write(6,*) '|___________________________________|' endif return end
And... It lives...:
View attachment 36594
Wait, you can do (5,*) and (6,*)? I did (*,*) for both read and write.
Standard FORTRAN reserves two UNIT numbers for I/O to user. They are:
UNIT = 5 for INPUT from the keyboard with the READ statement
UNIT = 6 for OUTPUT to the screen with the WRITE statement
Most versions of FORTRAN will also let you use the ASTERISK (*) for I/O to the TERMINAL. The asterisk can be used with both the READ and WRITE statements, thus there is no need to remember whether 5 or 6 is for input or output.