Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program test_char
- integer :: i = 48
- character(1) :: c
- c = achar(i)
- !write (0, fmt = '(a,i3,/,a,a)') 'ASCII number: ', i, 'Symbol: ', c ! returns 'J'
- !PRINT*, 'A great color is \033[95m pink \033[0m.'
- CALL EXECUTE_COMMAND_LINE('')
- !print *, 'A great color is '//achar(27)//'[91m pink '//achar(27)//'[0m.'
- write (0,fmt = '(a)') achar(27)//'[91m'//achar(i+5)//achar(27)//'[0m'
- end program test_char
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement