encoder =: MODELS_DIR conew ‘encoder'
If I run this line there is the usual progress messages and it completes. Now when I look a what encoder is storing I see:
encoder
┌─┐
│0│
└─┘
I can now use the functions in the encoder object as follows:
encode__encoder each 4 {. storylist
this will work and I will get back the expected lists of integers
Now when I try to set up a locale for the regex library and I use the following:
rgx =: conew ‘jregex’
rgx
┌─┐
│2│
└─┘
and then if I try to compile a pattern with the locale: phandle =: rxcomp__rgx pat J crashes.
However if I use this form:
rgx =: 0&".@> conew ‘jregex’
rgx
the phandle =: rxcomp__rgx pat will work as expected
The only differences I detect is that the encoder code has create and destroy code, the regex code does not. Because of the create verb the encoder conew involves a parameter, where the regex code does not have a parameter.
Not sure why there is a difference except that the encoder code was written to be object oriented but the regex code was not.
Tom McGuire
To unsubscribe from this group and stop receiving emails from it, send an email to forum+un...@jsoftware.com.