![]() ![]() The q is zero or more slash (/) record terminators. The FORTRAN-style format string must begin and end with parentheses. FORTRAN-Style Format Stringsįormat strings using the FORTRAN style have the form: FORMAT = '(q 1f 1s 1f 2s 2. ![]() You can also use formatted output with template literal strings, using either FORTRAN or C-printf style formats: x = print, `The values are: $` You can see that the FORTRAN style is less readable but is better for outputting multiple values, while the C-printf style is easier to read but is more verbose for multiple values. In both cases IDL prints: The values are: Now using the C printf-style: PRINT, FINDGEN( 3), FORMAT = 'The values are: ' Use the FORTRAN style to print out three numbers surrounded by brackets: PRINT, FINDGEN( 3), FORMAT = '("The values are: ")' Different operating systems implement this function in different ways, which may lead to slight inconsistencies in the appearance of the output. Note: IDL uses the standard I/O function snprintf to do its formatting. IDL supports two different syntaxes for format strings: a FORTRAN style and a C printf-style. Formatted input and output can be used with the PRINT, READ, and STRING functions, with the IDL_Variable::toString method, or within template literal strings. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |