Silverfrost Forums

Welcome to our forums

Which way is preferable, apostroph or double quotation mark?

11 Aug 2025 2:56 (Edited: 11 Aug 2025 7:18) #32273

The codes below both work OK but which way would be considered preferable? Which one is considered a major and which secondary? This one is right

     call winop@ ('%PL[axes_pen=2,frame, framed, frame_pen=2, width=2]')
     i = winio@  ('%PV%PL[x_axis='Time', y_axis= 'Energy', x_array, scale=linear]%ff&',  900, 600, N, X, Y) 

or this:

     call winop@ ('%PL[axes_pen=2,frame, framed, frame_pen=2, width=2]')     
     i = winio@  ('%PV%PL[x_axis='Time', y_axis= 'Energy', x_array, scale=linear]%ff&',  900, 600, N, X, Y)  

I think in the future even AI will be confused. It is better to define it than to have a total freedom/mess

11 Aug 2025 5:34 #32274

There is no preference. The Fortran Standard allows both forms.

17 Aug 2025 11:09 #32284

Dan,

As like me you are an oldie, use the single quotes until you want to display a single quote mark. A good example is for degrees, minutes and seconds where you could use ''' for minutes (double-single-double), and ''' for seconds (single-double-single). I think that is clearer than repeating the single like this '''' (single-single-single-single) for minutes.

On the other hand, if you use grads or gons with milligrads or milligons, then you have none of the degrees, minutes, seconds problem, but you do need to check the language of your user to determine if they call it a grad or a gon!

Eddie

Please login to reply.