function @rinstr not working properly

For notifying us of what you believe are bugs or errors in EViews.
Please ensure your copy of EViews is up-to-date before posting.

Moderators: EViews Gareth, EViews Moderator

mamo
Posts: 207
Joined: Wed Nov 07, 2012 9:11 am

function @rinstr not working properly

Postby mamo » Thu Jun 25, 2026 4:13 am

I use Eviews 14 Dec26 2024 build

The function @rinstr does not work as described in the help documentation which says:
Starting at the end of the string and searching in reverse, finds the starting position of the target string str2 in the string str1. By default, the function returns the location of the last (first from the end) instance of str2 in str1, but you may provide the optional integer n to change the occurrence.
Proof:

Code: Select all

!i=@rinstr("987654321", "8") Stautsline !i ' gives !i=2, rather than !i=8
So it seems @rinstr works in the same way as @instr, counting from left to the right.

EViews Matt
EViews Developer
Posts: 587
Joined: Thu Apr 25, 2013 7:48 pm

Re: function @rinstr not working properly

Postby EViews Matt » Thu Jun 25, 2026 10:53 am

Hello,

The @rinstr function is behaving as intended. While the @rinstr function performs a right-to-left search for a matching substring, in contrast to @instr's left-to-right search, both functions return a character location for the match, which is numbered left-to-right starting at 1. The search orders are different, but the results are presented in the same coordinate system.


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 2 guests