Who's Online 
 
              
          130  user(s) are online (
117  user(s) are browsing 
Forums )
Members: 1
Guests: 129
 
daveyw ,
    more...
  
      
     
   
 
                
        
            
                        
            
                        
  
      
          Topic options 
                           
            
      
          View mode 
                        Newest First 
                 
                      
              
    
         
 
    
  
    
    
        
    
    
        
            
         
        
            [SOLVED] [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 19:01 
                                  
                                    #1  
     
    
                
                             Amigans Defender
                         
                    
                        Joined: Last Login
                                : 
                                                    From  England
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        This always returns 0:
rx  "say lastpos('abcdabcd', 'b')"  
No matter what values I feed in, LASTPOS() always returns 0 which means "not found".
I can't get it to work under OS3.1 either.  Has it ever worked?  Is there an alternative function?
            
                                            
                
                
                    Edited by Chris on 2014/4/13 19:48:33
                      
     
    
                
                             
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 19:13 
                                  
                                    #2  
     
    
                
                             Not too shy to talk
                         
                    
                        Joined: Last Login
                                : 
                                                    From  Waterbury, Connecticut (USA)
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        @Chris
Quote:
This always returns 0:
rx  "say lastpos('abcdabcd', 'b')"  
 while i don't know if there is a difference in how it's implemented in AREXX, using ANSI REXX on z/OS, the format is different:
LASTPOS(needle,haystack) so if it's anything like ANSI REXX, then you'd want your code to be:
rx "say lastpos('b','abcdabcd')" see if that works. 
-- eliyahu
            
                                    
 
     
    
                
                                
                "Physical reality is consistent with universal laws. When the laws do not operate, there is no reality. All of this is unreal." 
            
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 19:32 
                                  
                                    #3  
     
    
                
                             Just can't stay away
                         
                    
                        Joined: Last Login
                                : 
                                                    From  France
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        @eliyahu
                        
            
                                    
 
     
    
                
                             
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 19:48 
                                  
                                    #4  
     
    
                
                             Amigans Defender
                         
                    
                        Joined: Last Login
                                : 
                                                    From  England
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        Wonderful, that works, thanks.
                        
            
                                    
 
     
    
                
                             
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [SOLVED] [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 20:10 
                                  
                                    #5  
     
    
                
                             Home away from home
                         
                    
                        Joined: Last Login
                                : 
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        Which documentation is that?
                        
            
                                    
 
     
    
                
                                
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [SOLVED] [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 20:13 
                                  
                                    #6  
     
    
                
                             Amigans Defender
                         
                    
                        Joined: Last Login
                                : 
                                                    From  England
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        ARexx.guide
                        
            
                                    
 
     
    
                
                             
     
    
        
     
     
   
        
        
  
    
    
        
    
    
        
            
         
        
            Re: [SOLVED] [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 21:10 
                                  
                                    #8  
     
    
                
                             Not too shy to talk
                         
                    
                        Joined: Last Login
                                : 
                                                    From  Waterbury, Connecticut (USA)
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        @broadblues
looks like the wiki is correct (
link ). 
-- eliyahu
            
                                    
 
     
    
                
                                
                "Physical reality is consistent with universal laws. When the laws do not operate, there is no reality. All of this is unreal." 
            
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [SOLVED] [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 21:40 
                                  
                                    #9  
     
    
                
                             Amigans Defender
                         
                    
                        Joined: Last Login
                                : 
                                                    From  England
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        @broadblues
                        
            
                                    
 
     
    
                
                             
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [SOLVED] [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/13 21:59 
                                  
                                    #10  
     
    
                
                             Just can't stay away
                         
                    
                        Joined: Last Login
                                : 
                                                    From  Gloucestershire, UK.
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        @Chris
Try This, I've been using it for years.
ARexx For Beginners (& Others) .guide 
            
                                    
 
     
    
                
                                
                Amiga user since 1985
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [SOLVED] [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/14 15:51 
                                  
                                    #11  
     
    
                
                             Amigans Defender
                         
                    
                        Joined: Last Login
                                : 
                                                    From  Canada
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        @Chris
Quote:
My AmigaGuide looks suspiciously similar to that, however as eliyahu notes, the wiki is correct. Some day I hope people will use the official documentation wiki as the first source of accurate information.
            
                                    
 
     
    
                
                                
                ExecSG Team Lead
            
                 
     
    
        
     
     
   
        
  
    
    
        
    
    
        
            
         
        
            Re: [SOLVED] [ARexx] Is LASTPOS() broken?
         
        
            
                                    Posted on: 
2014/4/14 18:59 
                                  
                                    #12  
     
    
                
                             Home away from home
                         
                    
                        Joined: Last Login
                                : 
                                                                            Group: 
                                 
                                                
                                                                            
                                             
                                     
        
                        @ssolie
Quote:
Some day I hope people will use the official documentation wiki as the first source of accurate information. I have an 
animicon  on my workbench which links directly to the wikki.
            
                                    
 
     
    
                
                                
                 
     
    
        
     
     
   
    
  
    
      Currently Active Users Viewing This Thread:
      1
      (
        0 members
                  and 1 Anonymous Users
              )