1 A named function declaration can be prepended with `export` to 2 automatically export the function. 3 4 -- File test-func-decl.uc -- 5 export function func() { 6 print("Hello, world!\n"); 7 }; 8 -- End -- 9 10 -- Testcase -- 11 import { func } from "./files/test-func-decl.uc"; 12 13 func(); 14 -- End -- 15 16 -- Args -- 17 -R 18 -- End -- 19 20 -- Expect stdout -- 21 Hello, world! 22 -- End --
This page was automatically generated by LXR 0.3.1. • OpenWrt