[Thread Prev][Thread Next][Index]

Re: [ferret_users] symbol substitution makes line too long



Hi Marco,
Ferret symbols are really string variables, where the string is always evaluated when making use of the variable. Because of that, a really long one is going to cause your script to exceed the command-line buffer which is a fixed string of length 2048.

Could you do what you want with a string variable? Possibly a multi-valued string variable? You might think of something where you write the strings to a netCDF file, or create a text file with Ferret or another method, then read them to a variable with FILE/FORM=DELIMITED/TYPE=text

Ansley

On 10/9/2015 4:24 AM, Marco van Hulten wrote:
Hello,

I want to make a long definition, but I get the problem that the "symbol
substitution makes line too long".  A minimal working example:

yes? define symbol test = 1234567890abcdef
yes? define symbol test = ($test) ($test)
  !-> define symbol test = 1234567890abcdef 1234567890abcdef
yes? define symbol test = ($test) ($test)
  !-> define symbol test = 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef
yes? define symbol test = ($test) ($test)
  !-> define symbol test = 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef
yes? define symbol test = ($test) ($test)
  !-> define symbol test = 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef
yes? define symbol test = ($test) ($test)
  !-> define symbol test = 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef
yes? define symbol test = ($test) ($test)
  !-> define symbol test = 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890a!
  bcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef
yes? define symbol test = ($test) ($test)
  **ERROR: invalid command: symbol substitution makes line too long
           TEST = 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 123!
  4567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef 1234567890abcdef

 From what does this limitation come?  Can I do something about it?

I want to use such a recursive substitution to define a mask.

Marco






[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement