Rosario19 wrote:   
   > (1) -> e(s:String,n:PI):Union(Character, ". failed")==(n>#s=>".   
   > failed";s.n)   
   > Function declaration e : (String,PositiveInteger) ->   
   > Union(Character   
   > ,. failed) has been added to workspace.   
   >   
   > Type: Void   
   > (2) -> e("123",1)   
   > Compiling function e with type (String,PositiveInteger) -> Union(   
   > Character,. failed)   
   > Conversion failed in the compiled user function e .   
   >   
   > Cannot convert from type String to Union(Character,. failed) for   
   > value   
   > "1"   
   >   
   > (2) -> e("123",4)   
   >   
   > (2) . failed   
   > Type: Union(.   
   > failed,...)   
   >   
   > the problem would be in computation (2) what it have to print is 1   
   > (Character) not "1" String   
   >   
   > Where is my error?   
      
   That looks like a bug. As a workaround you can do:   
      
   e(s:String,n:PI):Union(Character, ". failed")==(n>#s=>". failed"; return s.n)   
      
   or:   
      
   e(s:String,n:PI):Union(Character, ". failed")==(n>#s=>". failed"::". failed";   
   s.n)   
      
   This question really should go to system-specific list flavor of   
   Axiom that you are using.   
      
   --   
    Waldek Hebisch   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|