/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2009, Dave Pare, Jeff Bailey, Thomas Ruschak,
* Ken Stevens, Steve McClure
*
* This program is free software; you can redistribute it and/or modify
* PTR points to a context object of the type that was used to compile
* the value.
* Unless WANT is NSC_NOTYPE, coerce the value to promoted value type
- * WANT. VAL must be coercible. That's the case if a previous
- * nstr_coerce_val(VAL, WANT, STR) succeeded.
+ * WANT. VAL must be coercible.
*/
struct valstr *
nstr_exec_val(struct valstr *val, natid cnum, void *ptr, enum nsc_type want)
valtype = NSC_NOTYPE;
}
+ /* coerce */
if (valtype == want)
;
else if (want == NSC_DOUBLE) {
valtype = want;
val->val_as.dbl = val->val_as.lng;
}
- } else if (want == NSC_STRING)
- CANT_REACH(); /* FIXME implement */
+ }
if (CANT_HAPPEN(valtype != want && want != NSC_NOTYPE)) {
/* make up an error value */