[chuck-users] setenv?

Spencer Salazar ssalazar at princeton.edu
Thu Jun 1 10:54:20 EDT 2006


I think the best way to do that is to use a global class with a  
static member variable.  Among other advantages, you dont have to do  
any string to int/float conversion, if you accidentally mistype your  
variable names the compiler will complain, and its a lot more  
straightforward.

For converting ASCII strings to ints or floats, look at the std.atoi 
() and std.atof() functions.

spencer

On Jun 1, 2006, at 10:38 AM, Kassen wrote:

> Hi list,
>
> Is there a known issue with std.setenv() ?
>
> For me on XP sp1
>
> std.setenv("foo", "bar");
>
> Returns a zero and doesn't actually set anything.
>
> What I want to acomplish is the following; I want to have one shred
> that calls in a set of other shreds that all sync in the style of the
> otf examples but I'd like to set a environment variable that tells
> them what our bpm will be.
>
> Also; do I understand correctly that the only way of turning a string
> into a int or float is by abusing the acii numbers? Even if I happen
> to know the string is a number?
>
> As I type this I just realised it might be a lot more practical to
> stop postponing reading up on global classes, still it looks like
> std.setenv() is malfuctioning.
>
> Yours,
> kas.
> _______________________________________________
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
> https://lists.cs.princeton.edu/mailman/listinfo/chuck-users



More information about the chuck-users mailing list