representation problem
- Posted by gwalters at sc.rr.com Mar 17, 2002
- 378 views
I'm having trouble with this problem. How do you destinguish between these. They have the same length and they are both sequences but I need to treat them differently. for a i need to loop through and print each number but for b i need to print the string. I'm trying to modify Buddy Hyllberg data dump but am lost in this problem. sequence a,b a = {1,2,3,4} b = "1234" printf(1,"len a = %d len b = %d\n",{length(a),length(b)}) if atom(a) then puts(1,"a is an atom\n") else puts(1,"a is a seq\n") end if if atom(b) then puts(1,"b is an atom\n") else puts(1,"b is a seq\n") end if b = gets(0) george