Advertisement
Oppaceted

Untitled

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