Workaround to support default parameter values

Marcos Cruz <[email protected]> Thu, 20 Mar 2025 19:11:18 +0100
Newsgroups gmane.comp.lang.pike.user
Message-ID <[email protected]>
Since Pike does not support default parameter values, I use this
workaround:

```pike
int typed_number(string|void prompt) {
    if (!stringp(prompt)) {
        prompt = "";
    }
    // (…)
}
```

Is there a better approach?

-- 
Marcos Cruz
http://programandala.net