##- # Author: Brian Tiffin # Dedicated to the public domain # # Date: October 2016 # Modified: 2016-10-11/01:36-0400 ##+ # # map.icn, demonstrate map and tranform # procedure main() # upper to lower case mapping up := "This is a TEST" write(map(up)) # permutation mapping, allowing s3 to be the variable # s2 and s3 must be equal length s3 := "abcde" # '0' in s1 (index 1) maps to '0' in s2, (index 5) write("01234 43210: ", s3, " to ", map("01234", "43210", s3)) write("Multiple s1: ", s3, " to ", map("012343210", "43210", s3)) end