[Pipet Users] Command Compilation in Piper: A Discourse

Jean-Marc Valin jmvalin at locusdialogue.com
Tue Feb 13 11:41:56 EST 2001

> True, but this is not the point. You can use void* pointers in C, instead
> of char*. It"s just that sometimes it's nice to differentiate a char* and
> a FILE*, for instance: the underlying representation _is_ a pointer (an
> int ?), but the _semantics_ are different.
> The meaning of  a command line switch, a filename passed on the command
> line, a keyword passed on the command line are different, even if they
> are all thrown in char** argv when the program receives them. What Nicolas
> meant is that if you give your program a bunch of arbitrary char*, it
> won't be able to do much with it. Whereas if you say that this is a
> switch, it should be followed by the name of an existing file, then it
> becomes possible to process the data.

Well, in my example, I still identify that "this input requires a
filename" and "that input requires a config file". If you don't follw
that, then too bad for you. The same thing if a C function asks for a
process ID and you give it your phone number...

Defining a new type always requires come code. In Overflow the
implemented types are: Int, Float, Double, String, Bool, Vector<T>,
Stream, ...

If we start adding types for flags, filenames, ... then it becomes
endless. We'd need to divide "Vector" in "3D vector", "2D vector",
"AudioFrame", "FIRFilter", "IIRFilter", .... and the same for all types.
As for any language, the semantics can be taken into account with the
variable name (or in this case, the input name).


More information about the Pipet-Users mailing list