cangjie-stdio

Explain Cangjie standard input and output operations with console functions.

2|Updated Mar 10, 2026
One-click install
npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-stdio-zhenzhizhi12
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cangjie-stdio
Source: https://github.com/zhenzhizhi12/NexusAgent/tree/main/.opencode/skills/common-skill-l1/stdio
Command: npx skills add https://github.com/zhenzhizhi12/NexusAgent --skill cangjie-stdio-zhenzhizhi12

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps developers understand and utilize Cangjie language's standard input and output functionalities, enabling interactive programs and proper error handling.

Core Features & Use Cases

  • Basic I/O: Learn println for output and readln for input.
  • Error Streams: Understand eprint and eprintln for error messages.
  • Stream Access: Get direct access to stdin, stdout, and stderr via std.env.
  • Use Case: Build a simple command-line calculator that prompts the user for numbers and displays the result, handling potential input errors gracefully.

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 and write output to the console in Cangjie?

Console reading and writing in Cangjie uses built-in functions like println for output and readln for input. You can build interactive programs by prompting users with println and capturing their responses with readln.

What is the best way to log error messages in a Cangjie program?

Logging error messages in Cangjie is best done using eprint and eprintln. These functions write directly to the error stream, ensuring your standard output remains clean for regular program data and results.

How do I access stdin, stdout, and stderr streams directly in Cangjie?

Direct stream access for stdin, stdout, and stderr in Cangjie is achieved through std.env. This provides ConsoleReader and ConsoleWriter instances, allowing lower-level control over interactive program development and stream operations.

Can I build an interactive command-line calculator in Cangjie?

Building an interactive command-line calculator in Cangjie is fully supported. You use readln to prompt users for numbers and println to display the result, while handling potential input errors gracefully through the error stream.

Does Cangjie support separating standard output from error logging?

Cangjie supports separating standard output from error logging completely. By using println for standard console output and eprint for errors, you ensure interactive program data and error logs remain distinct.