home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,424 of 10,432   
   antispam@math.uni.wroc.pl to Ros@invalid.invalid   
   Re: [Axiom] why that return type?   
   15 May 17 18:22:03   
   
   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)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca