sdmx-twg / vtl

This repository is used for maintaining the SDMX-VTL specification
11 stars 7 forks source link

instr function return value #339

Closed capacma closed 1 year ago

capacma commented 7 years ago
reporter issue reference document (UM/RM/EBNF) page line
MC#339 RM 64 2321
MC#339 RM 64 2327
MC#339 RM 63 2252

Issue Description

String indexes start from 1 (instead of 0). 2321: If the string to search is not present in str then the value returned should be 0 instead of -1. 2327: B should 3 2252: wrong sentence: "startPostion must be major or equal than 0 and minor than the whole length of the input string".

Proposed Solution

2321: Change "then the value returned is -1" with "then the value returned is 0". 2327: Change B = 2 with B = 3 2252: change "startPostion must be major or equal than 0 and minor than the whole length of the input string." with "startPostion must be major or equal than 1 and minor than the whole length of the input string." Several examples starting at 2272

amattioc commented 1 year ago

fixed in https://github.com/sdmx-twg/vtl/commit/d301d6dccadb038d1bb619a361a4c798f7fecdef