Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
    • Switch to GitLab Next
  • Sign in / Register
inko
inko
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 42
    • Issues 42
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Inko
  • inkoinko
  • Merge Requests
  • !77

Merged
Opened Sep 01, 2019 by Mohamad Barbar@mbarbarContributor

Append a newline without blocking multiple times when printing to STDOUT/STDERR

  • Overview 2
  • Commits 2
  • Pipelines 2
  • Changes 2

For #160 (closed).

A small test script:

import std::stdio::stdout
import std::stdio::stderr

let mut x = stdout.print('Hello, world!')
stdout.print(x)
x = stdout.print('Bye, world!')
stdout.print(x)
x = stdout.print()
stdout.print(x)
x = stdout.print("---")
stdout.print(x)

x = stderr.print('Hello, world!')
stderr.print(x)
x = stderr.print('Bye, world!')
stderr.print(x)
x = stderr.print()
stderr.print(x)
x = stderr.print("---")
stderr.print(x)

When piping stdout/err to separate files the output in each should be:

Hello, world!
14
Bye, world!
12

1
---
4
Edited Sep 01, 2019 by Yorick Peterse
Assignee
Assign to
Reviewer
Request review from
0.5.0
Milestone
0.5.0
Assign milestone
Time tracking
Reference: inko-lang/inko!77
Source branch: master