1

I have the following statement in d3 pick:

OPEN '','AT-MASTER' TO AT.MASTER ELSE RETURN

The examples I have seen of the open statement either completely omit the comma and the thing before it, or they have something inside the thing before the comma, as follows, where dict is inside the single quotes before the comma.

open 'dict','invoice' to invoice.dict then
    print 'ok'
end else
    stop 201,'dict invoice cannot be opened'
end

What does the empty string made with single quotes that appears directly after the OPEN mean?

zelinka
  • 3,271
  • 6
  • 29
  • 42

1 Answers1

0

In old-style BASIC the syntax for OPEN 'DICT','FILENAME' was fixed. The empty first parameter means the Data file is being opened, not the Dictionary. Many developers still default to that syntax. Since the late 80's if only one parameter is present and it has only one word, it's assumed to mean the Data file. And all platforms these days support OPEN 'DICT FILENAME' in a single parameter. So the syntax with '','Datafile' is archaic but still works.

TonyG
  • 1,432
  • 12
  • 31
  • If this answers your question, please mark it Answered. And please go back to other questions you've posted and flag valid answers as acceptable or comment on what other info is required. Thanks. – TonyG Jun 12 '14 at 17:46
  • So is open 'dict','invoice' to invoice.dict equivalent to open '','invoice' to invoice.dict? – zelinka Jun 12 '14 at 18:31
  • Uh no. "dict","invoice" is equivalent to "dict invoice", and "","invoice" is equivalent to "invoice". Better? – TonyG Jun 12 '14 at 23:40