NCAR / ncl

The NCAR Command Language (NCL) is a scripting language for the analysis and visualization of climate and weather data.

Home Page:http://www.ncl.ucar.edu

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SPECX program question

mariajmolina opened this issue · comments

Hello! Quick question -- Is there supposed to be a space between the function being called and the input arguments on the referenced line? Thanks for your help.

CALL DDTRNDX (X,NX,IOPT,XINFO(1),XINFO(2),XINFO(3),COEF,IER)

That space is optional, according to fortran standards. In general, the standards allow any number of spaces between elements within a statement.

In practice this becomes a matter of style. Some people program consistently with or without a space between the function name and the parenthesis. Some people don't care and use the space inconsistently. I try to use single space for functions and subroutines, and no space when subscripting variables, so that I can tell them apart.

@Dave-Allured Thanks for clarifying this! Since asking, I continued looking thru scripts and have tested the space or no space, and have realized what you are saying. I like the approach of differentiating between functions/subroutines and scripting variables. I'll go ahead and close -- thanks again!