Skip to content

[p5.js 2.0 Beta Bug Report]: FES parameter validation for print not accepting multiple arguments #7597

Open
@limzykenneth

Description

@limzykenneth

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

p5.js version

2.0.0-beta.4

Web browser and version

No response

Operating system

No response

Steps to reproduce this

Steps:

  1. Use print() with more than 1 arguments will cause FES to print an incorrect message
    🌸 p5.js says: Expected at most 1 argument, but received more in print(). For more information, see https://p5js.org/reference/p5/print. 
    
  2. It should not be printing that message as print() like console.log() accepts any number of arguments. This should either be fixed in the reference and/or in FES parameter validation logic itself.

Snippet:

function setup() {
  createCanvas(400, 400);
  print(1, 2);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions