I have a function definition (a c interface) that (currently) looks like:
fun
newmodel {n,nv:nat} (
env: env, model: &model, mname: String (n),
numvars: int (nv), obj: cPtr0(double),
lb: cPtr0(double), ub: cPtr0(double),
vtype: String, varnames: stringlst_vt): int
The String (n) argument gives the error “the static term is overly applied.”
Somewhat unrelatedly, I’m almost sure I can’t directly past stringlst_vt to
something that expects char** - I’ll probably try to use templates to
convert each string to a concatenated sequence of chars.
It means the type I’m using doesn’t take additional sorts as arguments: I
should be using just string, which can be equivalent to strint_int_type (n:
int) :
Brandon Barker
brandon…@gmail.comOn Fri, Jan 24, 2014 at 2:28 AM, Brandon Barker brandon...@gmail.comwrote:
I have a function definition (a c interface) that (currently) looks like:
fun
newmodel {n,nv:nat} (
env: env, model: &model, mname: String (n),
numvars: int (nv), obj: cPtr0(double),
lb: cPtr0(double), ub: cPtr0(double),
vtype: String, varnames: stringlst_vt): int
The String (n) argument gives the error “the static term is overly
applied.”
Somewhat unrelatedly, I’m almost sure I can’t directly past stringlst_vt
to something that expects char** - I’ll probably try to use templates to
convert each string to a concatenated sequence of chars.
Should use ‘string’ instead of ‘String’; string is a non-dependent type.On Friday, January 24, 2014 9:18:07 AM UTC-5, Brandon Barker wrote:
Anyway, I think at this low-level, since I’m already using cPtr for other
args, and especially for this argument where there any size string will do,
it really doesn’t make sense to use a string (n), so I just switched back
to String.
On Fri, Jan 24, 2014 at 9:06 AM, Brandon Barker <brand...@gmail.com<javascript:> wrote:
It means the type I’m using doesn’t take additional sorts as arguments: I
should be using just string, which can be equivalent to strint_int_type (n:
int) :
On Fri, Jan 24, 2014 at 2:28 AM, Brandon Barker <brand...@gmail.com<javascript:> wrote:
I have a function definition (a c interface) that (currently) looks like:
fun
newmodel {n,nv:nat} (
env: env, model: &model, mname: String (n),
numvars: int (nv), obj: cPtr0(double),
lb: cPtr0(double), ub: cPtr0(double),
vtype: String, varnames: stringlst_vt): int
The String (n) argument gives the error “the static term is overly
applied.”
Somewhat unrelatedly, I’m almost sure I can’t directly past stringlst_vt
to something that expects char** - I’ll probably try to use templates to
convert each string to a concatenated sequence of chars.
fun
newmodel{nv:int}
(
env: env,
model: &model, mname: string,
numvars: int (nv), obj: cPtr0(double), lb: cPtr0(double), ub: cPtr0(double),
vtype: string, varnames: &array(varname, nv)
): int
If a string value can be NULL, then use stropt instead.On Friday, January 24, 2014 2:28:35 AM UTC-5, Brandon Barker wrote:
I have a function definition (a c interface) that (currently) looks like:
fun
newmodel {n,nv:nat} (
env: env, model: &model, mname: String (n),
numvars: int (nv), obj: cPtr0(double),
lb: cPtr0(double), ub: cPtr0(double),
vtype: String, varnames: stringlst_vt): int
The String (n) argument gives the error “the static term is overly
applied.”
Somewhat unrelatedly, I’m almost sure I can’t directly past stringlst_vt
to something that expects char** - I’ll probably try to use templates to
convert each string to a concatenated sequence of chars.
Anyway, I think at this low-level, since I’m already using cPtr for other
args, and especially for this argument where there any size string will do,
it really doesn’t make sense to use a string (n), so I just switched back
to String.
Brandon Barker
brandon…@gmail.comOn Fri, Jan 24, 2014 at 9:06 AM, Brandon Barker brandon...@gmail.comwrote:
It means the type I’m using doesn’t take additional sorts as arguments: I
should be using just string, which can be equivalent to strint_int_type (n:
int) :
I have a function definition (a c interface) that (currently) looks like:
fun
newmodel {n,nv:nat} (
env: env, model: &model, mname: String (n),
numvars: int (nv), obj: cPtr0(double),
lb: cPtr0(double), ub: cPtr0(double),
vtype: String, varnames: stringlst_vt): int
The String (n) argument gives the error “the static term is overly
applied.”
Somewhat unrelatedly, I’m almost sure I can’t directly past stringlst_vt
to something that expects char** - I’ll probably try to use templates to
convert each string to a concatenated sequence of chars.