# Xojo Parameter Brackets

**URL:** <https://ifnotnil.com/t/xojo-parameter-brackets/777>\
**Category:** General Programming\
**Created:** [24 July 2020 23:33 UTC](https://ifnotnil.com/t/xojo-parameter-brackets/777 "2020-07-24T23:33:10Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Meestor\_X](https://ifnotnil.com/user_avatar/ifnotnil.com/meestor_x/32/567_2.png) [@Meestor\_X](https://ifnotnil.com/u/Meestor_X)\
**Post date:** [24 July 2020 23:33 UTC](https://ifnotnil.com/t/xojo-parameter-brackets/777/1 "2020-07-24T23:33:10Z")

</div>

Seems like brackets are optional? What’s the rule here?

`System.DebugLog "Hi Mom!"`

works as well as

`System.DebugLog("Hi Mom!")`

---

<div class="post-metadata">

**Author:** ![Karen](https://ifnotnil.com/letter_avatar_proxy/v4/letter/k/7feea3/32.png) [@Karen](https://ifnotnil.com/u/Karen)\
**Post date:** [24 July 2020 23:51 UTC](https://ifnotnil.com/t/xojo-parameter-brackets/777/2 "2020-07-24T23:51:00Z")

</div>

If the method returns a value (a function) any parameters passed need to be enclosed in parentheses.

If It is a just a method (no return value) they are optional

-karen

---

<div class="post-metadata">

**Author:** ![Meestor\_X](https://ifnotnil.com/user_avatar/ifnotnil.com/meestor_x/32/567_2.png) [@Meestor\_X](https://ifnotnil.com/u/Meestor_X)\
**Post date:** [25 July 2020 00:29 UTC](https://ifnotnil.com/t/xojo-parameter-brackets/777/3 "2020-07-25T00:29:01Z")

</div>

Thanks, @Karen.  
I wonder where that policy came from? I’ve not noticed other languages that work that way…

---

<div class="post-metadata">

**Author:** ![MarkusWinter](https://ifnotnil.com/user_avatar/ifnotnil.com/markuswinter/32/32_2.png) [@MarkusWinter](https://ifnotnil.com/u/MarkusWinter)\
**Post date:** [25 July 2020 21:00 UTC](https://ifnotnil.com/t/xojo-parameter-brackets/777/4 "2020-07-25T21:00:31Z")

</div>

I would guess because when you return a value that value not only has to be used (assigned to something) but the return value could be combined with other values before assignment.

Eg

Y = someFunction( x + a + b ) + c

Y = someFunction x + a + b + c

---

<div class="post-metadata">

**Author:** ![Meestor\_X](https://ifnotnil.com/user_avatar/ifnotnil.com/meestor_x/32/567_2.png) [@Meestor\_X](https://ifnotnil.com/u/Meestor_X)\
**Post date:** [26 July 2020 15:27 UTC](https://ifnotnil.com/t/xojo-parameter-brackets/777/5 "2020-07-26T15:27:35Z")

</div>

Sorry, I probably wasn’t being clear. What I meant was, are there any other languages where brackets for parameters are optional? I’ve not encountered that before, and only noticed it when looking at others (usually older) Xojo/RB code.

---

<div class="post-metadata">

**Author:** ![npalardy](https://ifnotnil.com/user_avatar/ifnotnil.com/npalardy/32/10_2.png) [@npalardy](https://ifnotnil.com/u/npalardy)\
**Post date:** [26 July 2020 16:38 UTC](https://ifnotnil.com/t/xojo-parameter-brackets/777/6 "2020-07-26T16:38:48Z")

</div>

You’d have to ask Andrew Barry - the original design of Cross Basic which has evolved into Xojo  
This has been the case forever

> [@Meestor\_X](#):
>
> What I meant was, are there any other languages where brackets for parameters are optional?

I dont know of one
