News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

GDB print fortran character arrays as string literals

Started by creeping, January 09, 2008, 10:51:37 PM

Previous topic - Next topic

creeping

I've set-up Codeblocks to compile Fortran 77 projects successfully. I've also been able to use the debugger to watch variables.

However one thing that is annoying me is the output for character arrays. Is there any way to view the watch as a character string, instead of a character array with accompanying ASCII character number?

e.g. I have a variable:

character*4 site

I add a watch "site__" and it prints:

(66 'B', 76 'L', 85 'U', 70 'F')

I've tried changing the watch "Format" to character but it just gives the following output:

(<error reading variable>, <error reading variable>, <error reading variable>, <error reading variable>)

I would be good to get the watch to print "BLUF". I could even live with "('B', 'L', 'U', 'F')"

Thanks