Skip to content
  • Mark OLESEN's avatar
    4e48beff
    ENH: support "one-shot" changes to the dictionary inputMode (issue #429) · 4e48beff
    Mark OLESEN authored
    - Instead of relying on #inputMode to effect a global change it is now
      possible (and recommended) to a temporary change in the inputMode
      for the following entry.
    
         #default   : provide default value if entry is not already defined
         #overwrite : silently remove a previously existing entry
         #warn      : warn about duplicate entries
         #error     : error if any duplicate entries occur
         #merge     : merge sub-dictionaries when possible (the default mode)
    
      This is generally less cumbersome than the switching the global
      inputMode. For example to provide a set of fallback values.
    
          #includeIfPresent "user-files"
          ...
          #default value uniform 10;
    
      vs.
    
          #includeIfPresent "user-files"
          #inputMode protect
          ...
          value uniform 10;
          #inputMode merge    // _Assuming_ we actually had this before
    
      These directives can also be used to suppress the normal dictionary
      merge semantics:
    
         #overwrite dict { entry val; ... }
    4e48beff
    ENH: support "one-shot" changes to the dictionary inputMode (issue #429)
    Mark OLESEN authored
    - Instead of relying on #inputMode to effect a global change it is now
      possible (and recommended) to a temporary change in the inputMode
      for the following entry.
    
         #default   : provide default value if entry is not already defined
         #overwrite : silently remove a previously existing entry
         #warn      : warn about duplicate entries
         #error     : error if any duplicate entries occur
         #merge     : merge sub-dictionaries when possible (the default mode)
    
      This is generally less cumbersome than the switching the global
      inputMode. For example to provide a set of fallback values.
    
          #includeIfPresent "user-files"
          ...
          #default value uniform 10;
    
      vs.
    
          #includeIfPresent "user-files"
          #inputMode protect
          ...
          value uniform 10;
          #inputMode merge    // _Assuming_ we actually had this before
    
      These directives can also be used to suppress the normal dictionary
      merge semantics:
    
         #overwrite dict { entry val; ... }
Loading