Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!usc!apple!agate!ucbvax!MTS.cc.Wayne.edu!Paul_Abrahams From: Paul_Abrahams@MTS.cc.Wayne.edu Newsgroups: comp.lang.icon Subject: Portability Message-ID: <317920@MTS.cc.Wayne.edu> Date: 9 Apr 91 17:29:58 GMT Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 24 An example of a portable Icon function with a nonportable implementation is the file name generator I posted a while back. Given a file name with wildcards, its result sequence is the set of specific file names that match. The DOS implementation uses a specific system call, while the Unix implementation (I'd guess) would use a shell echo call with redirected output (since wildcard interpretation is generally done in the shell, not in the underlying system.) Note that DOS wildcards and Unix wildcards have somewhat different interpretations: DOS essentially ignores characters after `*', while Unix doesn't; and the DOS treatment of the file extension is quite different from that of Unix. Path name interpretation is another example of a portable function with a non-portable implementation, since DOS uses `\' but Unix uses `/' (and maybe the Mac uses something else again). But the notion of a path makes sense in any system that has tree-structured directories. (Does anyone know how this maps to the IBM OS/370 world?) Paul Abrahams Abrahams@mts.cc.wayne.edu