lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 2 - io.open() is less permissive in 5.2 than 5.1 so we can't open z/OS native files ("DataSets"). These "DataSets" generally require extra spec. in 'mode' parm., ex:
>       local output = io.open( "//'my.local.dataset'", "wb,type=record,lrec=133,recfm=fba" : 

The C standard documentation for 'fopen' explicitly says that the
behavior is undefined for not standard modes ("r", "rb", "w", "wb",
etc.), but then in a footnote it says that implementations can use
extentions in the sufix of mode:

  The argument mode points to a string. If the string is one of the
  following, the file is open in the indicated mode. Otherwise, the
  behavior is undefined. [228]

  ...

  [228] If the string begins with one of the above sequences, the
  implementation might choose to ignore the remaining characters, or
  it might use them to select different kinds of a file (some of which
  might not conform to the properties in 7.19.2).

Does anyone remember any system that craches with an invalid mode? And
with an invalid mode sufix?

-- Roberto