Re: Enforcing checks for return code

2016-02-21 Thread Chris Katko via Digitalmars-d-learn
On Thursday, 18 February 2016 at 10:46:03 UTC, Marc Schütz wrote: On Thursday, 18 February 2016 at 07:21:05 UTC, Chris Katko wrote: [...] As Jonathan said, there's no such built-in feature, and exception are preferred over return codes. However, you can implement such a check at run time:

Re: Enforcing checks for return code

2016-02-18 Thread Marc Schütz via Digitalmars-d-learn
On Thursday, 18 February 2016 at 07:21:05 UTC, Chris Katko wrote: Hello. I'm almost brand-new to the D language and still absorbing things. I'm wondering if it's possible to fire off a compile-time (or worst case, a run-time) warning or error if a function is called, but the return value is

Re: Enforcing checks for return code

2016-02-18 Thread tsbockman via Digitalmars-d-learn
On Thursday, 18 February 2016 at 07:21:05 UTC, Chris Katko wrote: Hello. I'm almost brand-new to the D language and still absorbing things. I'm wondering if it's possible to fire off a compile-time (or worst case, a run-time) warning or error if a function is called, but the return value is

Re: Enforcing checks for return code

2016-02-18 Thread Jonathan M Davis via Digitalmars-d-learn
On Thursday, February 18, 2016 07:21:05 Chris Katko via Digitalmars-d-learn wrote: > Hello. I'm almost brand-new to the D language and still absorbing > things. > > I'm wondering if it's possible to fire off a compile-time (or > worst case, a run-time) warning or error if a function is called, >

Enforcing checks for return code

2016-02-17 Thread Chris Katko via Digitalmars-d-learn
Hello. I'm almost brand-new to the D language and still absorbing things. I'm wondering if it's possible to fire off a compile-time (or worst case, a run-time) warning or error if a function is called, but the return value is not checked. I'm not trying to enforce whether someone actually