export const for core

Use parse-time constant from a module and export them from this module.

Signature

> export const {flags} (const_name) (initial_value)

Parameters

  • const_name: constant name
  • initial_value: equals sign followed by constant value

Input/output types:

input output
nothing nothing

Examples

Re-export a command from another module

> module spam { export const foo = 3; }
    module eggs { export use spam foo }
    use eggs foo
    foo

3

Notes

This command is a parser keyword. For details, check: https://irsh.vercel.app/book/thinking_in_rsh.html