Re: Subscripting in SPL
Posted in 1998
Well, I know that you can use constants as subscripts, but my question was about using variabales. I'd like to do something like this: FOR i = 1 TO max_i IF str[i] = certain_character THEN LET str[i] = another_character; END IF END FOR SPL gives me syntax error ... /Boris dtracy@informix.com wrote: > If you are trying to subscript a char field it is very simple > > select col1[5,3] from table.... > > This should return 3 chars starting at offset 5 from col1. > > dtracy > > Boris Niyazov wrote: > > > > Hi All, > > > > Does anybody know how to do variable subscripting of character string in > > SPL (I need to inspect a string for a particular charater and replace > > it)? According to Informix manual only constatnts are allowed as > > subscripts. Is any way around? > > > > Thanks > > ********************************************************************* > > * Boris Niyazov Ph: 212-854-4094 Fax: 212-316-2623 * > > * Systems Manager Email: ban5@columbia.edu * > > * Columbia Law School URL: http://www.law.columbia.edu * > > ********************************************************************* > > --