Skip to content
GitLab
    • GitLab: the DevOps platform
    • Explore GitLab
    • Install GitLab
    • How GitLab compares
    • Get started
    • GitLab docs
    • GitLab Learn
  • Pricing
  • Talk to an expert
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
    Projects Groups Topics Snippets
  • Register
  • Sign in
  • scilab scilab
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 2,573
    • Issues 2,573
    • List
    • Boards
    • Service Desk
    • Milestones
    • Requirements
  • Merge requests 48
    • Merge requests 48
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • scilabscilab
  • scilabscilab
  • Issues
  • #14998
Closed
Open
Issue created Feb 16, 2017 by scilab bot@scilabbot💬Owner

mscanf() introduces a leading \n newline and the prompt before prompting the user for input

Reported by Samuel GOUGEON (@sgougeon)

BUG DESCRIPTION:
----------------
In Scilab 4.1.2, we had:
-----------------------
-->mprintf("abcd"); mprintf("efgh");
abcdefgh   // so mprintf() does not append any \n. Now:
-->mprintf("message:"); i = mscanf("%s")
message:-->abcd    // We are prompted on the same line: OK (but the prompt should be "" or not here)
 i  =

 abcd     // OK

-->

In Scilab 5.5 and 6.0.0:
-----------------------
--> mprintf("abcd"); mprintf("efgh");
abcdefgh                                   // OK: same as always
--> mprintf("message:"); i = mscanf("%s")
message:                 // Now, a \n is introduced before prompting = BUG
--> abcd
 i  = 


 abcd

-->
 
ERROR LOG:
----------
none. Wrong behavior

HOW TO REPRODUCE THE BUG:
-------------------------
mprintf("abcd"); mprintf("efgh");
mprintf("message:"); i = mscanf("%s")

OTHER INFORMATION:
------------------
This hinders the input() behavior.
Scilab is a high level language. It is strange to have such a bug on a
so standard feature, not working properly.
Assignee
Assign to
Time tracking