1*e6d6c189SCody Peter MelloBEGIN { 2*e6d6c189SCody Peter Mello x = "A" 3*e6d6c189SCody Peter Mello printf("%-39s\n", substr(x,1,39)) 4*e6d6c189SCody Peter Mello print substr("abcdef", 0, 2) 5*e6d6c189SCody Peter Mello print substr("abcdef", 2.3, 2) 6*e6d6c189SCody Peter Mello print substr("abcdef", -1, 2) 7*e6d6c189SCody Peter Mello print substr("abcdef", 1, 0) 8*e6d6c189SCody Peter Mello print substr("abcdef", 1, -3) 9*e6d6c189SCody Peter Mello print substr("abcdef", 1, 2.3) 10*e6d6c189SCody Peter Mello print substr("", 1, 2) 11*e6d6c189SCody Peter Mello print substr("abcdef", 5, 5) 12*e6d6c189SCody Peter Mello print substr("abcdef", 7, 2) 13*e6d6c189SCody Peter Mello exit (0) 14*e6d6c189SCody Peter Mello} 15