Ticket #82 (closed defect: fixed)

Opened 5 months ago

Last modified 3 months ago

substr(string,start,end) doesn't mimic the cl when start is zero.

Reported by: rij Assigned to: somebody
Priority: normal Milestone: PyRAF 1.6
Component: none Version:
Severity: normal Keywords:
Cc:

Description (Last modified by rij)

Under the cl:
tables> =tabpar.value
0
tables> =substr(tabpar.value,0,1)

Under PyRAF:
--> iraf.tabpar.value
'0'
--> substr(iraf.tabpar.value,0,1)
'0'

The iraf substring is interpreted as a Python substring by subtracting 1 from the start index. However, under Python, -1 has a different meaning as an array index from 0 under the cl. Just need to trap this.

Change History

04/08/08 13:33:52 changed by rij

  • description changed.

05/12/08 09:12:54 changed by sontag

  • status changed from new to closed.
  • resolution set to fixed.

Robert fixed this, and it went into 1.6.