Well in that case I don't think you can do it. As far as I know, the only ways are:
1) Create a class, compile it to a library then initialize an instance of the library to call the sub (eg: library.sub);
2) Create a class & declare a Public Sub, then initialize an instance of the class to call the sub (eg:class.sub);
3) Create a code module & declare a Public Sub, then call the sub from another module, activity or service (eg: module.sub);
4) Create an activity or service & declare a Public Sub, then call it from another module, activity or service (eg: CallSub(activity/service, "sub").
I don't think there's any way to create a globally visible sub & access it without a reference to the class, module, service or activity that it resides in. In fact, I can't think of a way of doing that in any of the languages I code in. Eg: even if you create an extension or singleton in Swift, you still have to use a reference to the class or type that it's declared in to access it.
Why do you need to access it like a built-in function?
- Colin.