Discussions

SmileBASIC Community

DasEtwasMyTheo00

12/04/2016 10:32 AM ·Spoilers

Open Closed

()

When does one need to use parantheses for the parameters? and what does COMMON stand for?

Advertisement

Comment

This post has no comments.

  • There are three main types of functions... DEF FUNC X,Y ... END ...has no return values. Doesn't have parenthesis. DEF FUNC(X,Y) ... RETURN A END ...has a single return value. Has parenthesis. DEF FUNC X,Y OUT A,B ... END ...has multiple return values. Doesn't have parenthesis, but haves OUT.

    Yeahs3
    Played
  • COMMON DEF FUNC(FOO) ... RETURN BAR END The COMMON specification allows a function to be called from a program slot other than the one it's in. It's common (ha!) to find it in libraries, engines and such.

    Yeahs3
    Played
  • Thanks!

    Yeahs0
  • Do I need to add parentheses when calling functions?

    Yeahs0
  • Only if they have a single return value! Using the examples I left previously, this is how you'd call each one. FUNC 2,3 ...for instructions with no return values. A=FUNC(2,3) ...for functions with a single return value. FUNC 2,3 OUT A,B ...for functions with multiple return values.

    Yeahs1
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-EJ9-9E2N-HBN-76RU

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: