Hi,
How to I get the index of a particular element of an svector:
Example of what this function could look like:
SVector(3) sVRows
sVRows(1) = "First"
sVRows(2) = "Second"
sVRows(3) = "Third"
!iK = sVRows.GetIndex("Second")
' !iK should be equal to 2
Index of sVector
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13604
- Joined: Tue Sep 16, 2008 5:38 pm
Re: Index of sVector
There's no built in function to do that. You'll have to simply loop through the rows until you find a match.
Of course you'll have to decide what you want to do in the case of duplicates.
Of course you'll have to decide what you want to do in the case of duplicates.
Who is online
Users browsing this forum: No registered users and 2 guests
