July 28, 200619 yr Example of slen: (Not mentioned in the panel SDK)(@c:WaypointAirportRunwayDesignation) slen (>L:length,number) Works! It will return 7 for '01L-19R'Now I want to search for the symbols 'L', 'R' and/or 'C' To find character in a string the syntax is said to be schr, so I tried: ( runway 0 selected! in EHAM 01L-19R ) (@c:WaypointAirportRunwayDesignation,string) 'L' schr if{ 1 (>L:RwayTag,enum) } . (@c:WaypointAirportRunwayDesignation,string) 'R' schr if{ 2 (>L:RwayTag,enum) } . (@c:WaypointAirportRunwayDesignation,string) 'C' schr if{ 3 (>L:RwayTag,enum) } (L:RwayTag,enum) always becomes 3 even if there is no C in 01L-19R I also tried it with ! which works perfectly for (@c:NearestAirportCurrentIdent,string)'EH' sstr ! if{ 3000 } (@c:WaypointAirportRunwayDesignation,string) 'L' schr ! if{ 1 (>L:RwayTag,enum) } . (@c:WaypointAirportRunwayDesignation,string) 'R' schr ! if{ 2 (>L:RwayTag,enum) } . (@c:WaypointAirportRunwayDesignation,string) 'C' schr ! if{ 3 (>L:RwayTag,enum) } Here (L:RwayTag,enum) always stays 0 which would imply that none of the conditions is true Have the following schr, symb or ssub ever been tried succesfully?If so, I would be pleased to know how!Roelof
August 2, 200619 yr Since there were no answers I did some digging.This is how it works:(@c:WaypointAirportRunwayDesignation) 'R' ord schr (>L:Found,number)Given the designation being '01L-19R'When not found it returns -1, when found it returns the position in the string starting with zero! 'L' wil return 2 and 'R' will return 6. How's that for an elegant solution.Roelof
Create an account or sign in to comment