Imports
Use the import statement to bring declarations from other packages into the current file. Import statements must be placed after the package declaration and before other declarations.
Cangjie provides multiple import methods: import pkg.item to import a specific item, import pkg.* to import all public declarations from a package, or import pkg.{a, b} to import multiple items at once. The example on the right imports the square root function and the PI constant from the standard library's math package using import std.math.sqrt and import std.math.PI.
After importing, you can use sqrt and PI directly without the full path. This is more concise than writing std.math.sqrt every time.
core package, so commonly used types and functions like String, Array, println, etc. can be used directly without explicit imports.Try changing the import to import std.math.*, the program will still run normally.