Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Suggestion about the functions and the brackets
#2
programandala.net Wrote:I suggest to always use brackets with functions, both in the Syntax and Examples sections, and everywhere in the docs.

I disagree. This would break compatibility with Sinclair Basic.

programandala.net Wrote:I suggest to include a note in the language reference page in order to explain that brackets are optional in functions for the sake of compatibility with Sinclair BASIC (and maybe FreeBASIC in some cases). But that's all.

I think the code is much more clear with brackets; they help to avoid bugs too. And it's the standard beside a good practice, isn't it? On the other hand, it's good to have a clear convention to write the docs.


Wait, now you're saying you don't want to require it at all? Perhaps I'm misreading it - you're saying to always allow brackets, for things like RND? I suppose there's no reason not to allow RND() - and I think Boriel has updated the function to allow that; but since it never takes any parameters I don't think it matters. It behaves just like PI in most respects - it replaces a number.
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)