Interestingly, as a side note, it seems a bit odd that 0 is passed as the
third argument: already dependent types could be useful in this scenario,
since in their example, the number of variables (which I assume should be
numvars) should be 3.
Brandon Barker
brandon…@gmail.comOn Thu, Jan 23, 2014 at 5:54 PM, Brandon Barker brandon...@gmail.comwrote:
Relatedly, I was actually about to ask a similar question. How to do this
in general (not just for char*)?
currently I was thinking of implementing a datavtype that is very similar
to an option_vt but is either sometype or NULL (instead of sometype or
void), where NULL is:
macdef NULL = $extype(ptr, “0”)
For context, I have a C function that looks like this:
GRBnewmodel(GRBenv *env, GRBmodel **modelP, const char *Pname, intnumvars
,
double *obj, double *lb, double *ub, char *vtype,
char **varnames);
Where an example call looks like this:
error = GRBaddvars(model, 3, 0, NULL, NULL, NULL, obj, NULL, NULL, vtype
,
NULL);
On Thursday, January 23, 2014 5:48:46 PM UTC-5, gmhwxi wrote:
When using these types, please get the ‘cast’ function ready 
Proving stuff at this level may not be what you want to do right now.
On Thursday, January 23, 2014 5:46:13 PM UTC-5, gmhwxi wrote:
Take a look at ‘stropt’ (functional) or ‘strptr’ (linear).
On Thursday, January 23, 2014 5:34:48 PM UTC-5, H Zhang wrote:
Some C library functions use zero valued pointer for special meaning.
What is the best way to model this? I would like to use string to model
char*, but then I can’t assign the value zero to a variable of type string.
–
You received this message because you are subscribed to the Google Groups
“ats-lang-users” group.
To unsubscribe from this group and stop receiving emails from it, send an
email to ats-lang-user...@googlegroups.com.
To post to this group, send email to ats-lan...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/ats-lang-users/678eb1df-cd7e-4e65-a422-80fcfe21c743%40googlegroups.com
.