cangjie-basic-data-type

Explain Cangjie fundamental data types, literal syntax, operators, and conversions.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a comprehensive guide to understanding and utilizing the fundamental data types within the Cangjie programming language, enabling developers to correctly represent and manipulate data.

Core Features & Use Cases

  • Data Type Reference: Details on integers, floats, booleans, runes, strings, Unit, Nothing, tuples, arrays, and ranges.
  • Literal and Operator Syntax: Explains how to write literals and use operators for each data type.
  • Type Conversion: Covers explicit and implicit type conversions.
  • Use Case: A developer new to Cangjie needs to understand how to declare variables for different kinds of data, such as storing user input as a string, performing calculations with integers, or representing true/false conditions with booleans.

Quick Start

Explain the integer types available in Cangjie.

Frequently Asked Questions about cangjie-basic-data-type

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

FAQPage Schema
What are the fundamental data types in the Cangjie programming language?

Cangjie's fundamental data types include integers, floats, booleans, runes, strings, Unit, Nothing, tuples, arrays, and ranges. These types allow developers to correctly represent and manipulate various forms of data within their programs.

How do I declare variables and write literals in Cangjie?

You declare variables in Cangjie by assigning specific literal syntax to them. The language supports distinct literal formats and operators for each data type, enabling precise representation of strings, numbers, and boolean values.

How does Cangjie handle type conversions for integers and floats?

Cangjie handles type conversions through both explicit and implicit mechanisms. Developers must understand these conversion rules to safely perform calculations between different numeric types like integers and floats without data loss.

When should I use Unit and Nothing types in Cangjie?

You use Unit and Nothing types in Cangjie to represent specific data states, such as indicating the absence of a meaningful return value. They are essential for correctly modeling function returns and empty states in your syntax.

Can I use arrays, tuples, and ranges to store multiple values in Cangjie?

Yes, Cangjie supports arrays, tuples, and ranges as fundamental data types for storing multiple values. These collection types allow developers to group related data elements together for efficient manipulation and iteration.

Does Cangjie support rune literals for character representation?

Yes, Cangjie includes runes as a fundamental data type for character representation. Developers use specific rune literal syntax to accurately handle individual characters within their applications.