cangjie-stdio

Explain Cangjie standard input, output, and error stream functions.

1|Updated Mar 14, 2026
One-click install
npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-stdio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-stdio
Source: https://github.com/SunriseSummer/CangjieDocValidator/tree/main/.github/skills/stdio
Command: npx skills add https://github.com/SunriseSummer/CangjieDocValidator --skill cangjie-stdio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers understand and utilize Cangjie's standard input, output, and error stream functionalities, enabling effective console interaction and data handling.

Core Features & Use Cases

  • Basic I/O: Learn to print messages to the console (println, print) and read user input (readln).
  • Error Handling: Differentiate between standard output and standard error streams (eprintln, eprint).
  • Advanced Stream Control: Gain access to raw input/output streams for more granular control using std.env.
  • Use Case: Build interactive command-line applications in Cangjie that prompt users for information, display results, and log errors.

Quick Start

Use the cangjie-stdio skill to print "Hello, Cangjie!" to the console.

Frequently Asked Questions about cangjie-stdio

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I read user input from the console in Cangjie?

To read console input in Cangjie, use the built-in `readln` function. This captures standard input streams, allowing your interactive command-line applications to prompt users for information and process responses directly.

How do I print messages to the console in Cangjie?

To print messages in Cangjie, use the built-in `print` and `println` functions. These handle standard output streams, displaying program results and text to the console during execution.

How do I write error messages to the standard error stream in Cangjie?

To write error messages to the standard error stream in Cangjie, use the `eprintln` and `eprint` functions. This differentiates error logging from standard output, ensuring proper execution flow tracking.

Can I access raw input and output streams in Cangjie?

Yes, you can access raw input and output streams in Cangjie using `std.env`. This provides advanced stream control for granular console reading and writing beyond basic built-in functions.

What is the best way to build interactive command-line applications in Cangjie?

The best way to build interactive command-line applications in Cangjie is combining `println` for prompts, `readln` for user input, and `eprintln` for error logging. This manages standard input, output, and error streams effectively.