Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!kepler1!fcaggian From: fcaggian@kepler.com (Frank Caggiano) Newsgroups: comp.lang.eiffel Subject: Re: formated string objects Summary: use of MakeStr Keywords: sprintf like routine Message-ID: <461@kepler1.kepler.com> Date: 7 Jan 91 18:36:41 GMT References: <457@kepler1.kepler.com> <475@eiffel.UUCP> Organization: Kepler Financial Mgmt., Setuket, NY Lines: 40 In article <475@eiffel.UUCP>, marc@eiffel.UUCP (Jean-Marc Nerson) writes: > Your contribution will be very helpful. > > I slightly updated your C code to include: > 2) Use of specific Eiffel run-time routine MakeStr() > instead of eif_create() and eif_rout() > > The diff -c follows. [ Number of lines deleted ] [from] > ! strobj = (OBJPTR) eif_create("string", 0) > ! from_c = (ROUT_PTR) eif_rout(strobj, "from_c"); > ! (*from_c) (strobj, buf); > ! return (strobj); [to] > ! return (MakeStr (buf)); > } Does this mean that the return from MakeStr() is an Eiffel string object ? It would be legal to do something like: OBJPTR s; ROUT_PTR r; s = MakeStr (buf); r = (ROUT_PTR) (s, "append"); (*r)(s,s); [ Doesn't really do anything, just illustrates my question ] This is good to know as I do a lot of passing of string objects back from C. Thanks for the input. -- Frank Caggiano INTERNET: fcaggian@kepler.com Kepler Financial Management, Ltd. UUCP: ..!uunet!kepler1!fcaggian 100 North Country Rd. fax: (516) 751-8678 Sekauket, NY 11733 voice: (516) 689-6300