Guest User

Untitled

a guest
Jan 23rd, 2017
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. /d1 2 dict def
  2. d1 begin
  3. 3 (Some Int) def
  4. 3.0 (Some Real) def
  5. end
  6.  
  7. /d2 2 dict def
  8. d2 begin
  9. 3.0 (Some Real) def
  10. 3 (Some Int) def
  11. end
  12.  
  13. /p1 { dup type == ( -> ) print == } def
  14.  
  15. (*** d1 ***\n) print
  16. d1 { exch p1 p1 } forall
  17. (*** d2 ***\n) print
  18. d2 { exch p1 p1 } forall
  19.  
  20. ============ OUTPUT ============
  21. *** d1 ***
  22. integertype
  23. -> 3
  24. stringtype
  25. -> (Some Real)
  26. *** d2 ***
  27. realtype
  28. -> 3.0
  29. stringtype
  30. -> (Some Int)
Add Comment
Please, Sign In to add comment