Discussions

Petit computer 3 Community

きょうふのひとbordersign

09/06/2017 9:41 AM ·Spoilers

Open Closed

ON~GOTOについて

C言語のswitchっぽい動作をしたいのですが、こう記述すると Duplicate labelin 0:232 とエラーを吐かれます。 どうすれば再現できますか?

Advertisement

Comment

This post has no comments.

  • say

    09/06/2017 9:50 AM ·Spoilers

    on gotoってカンマ不要だっけ?

    Yeahs1
    Played
  • 必要ですね

    Yeahs0
    Played
  • てことは、プチコンでは : 省略可能なので on .. goto @upward ' on goto 命令ここでおわり @right 'ラベルの定義 @down '同上 @left '同上 @upward '同上 @down '同上 if dir==upward then ... と解釈された結果、 @down が二つあるよってエラー発生.

    Yeahs1
    Played
  • おおう、カンマ必要だったのか。 入れたら正常に動作しました、ありがとうございました。

    Yeahs0
    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-DPU-2NL7-T9A-4Z9C

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: