From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2def9aa85afa5d22 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-11-22 00:06:30 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!supernews.com!logbridge.uoregon.edu!arclight.uoregon.edu!wn4feed!worldnet.att.net!135.173.83.71!wnfilter1!worldnet-localpost!bgtnsc06-news.ops.worldnet.att.net.POSTED!not-for-mail From: "David Thompson" Newsgroups: comp.lang.ada References: <3BDCE159.39F6D422@adaworks.com> <11bf7180.0110290311.4d8d6f04@posting.google.com> <3BDF9C6A.C25520C5@adaworks.com> <3BE023AB.8F235EF5@sparc01.ftw.rsc.raytheon.com> <9rp8mo$6d8$1@nh.pace.co.uk> <9rrmvl$98d$1@nh.pace.co.uk> <3BE4221B.34589071@adaworks.com> <3BE43CDC.F6B1EE30@acm.org> <3BE813E4.C4797DDE@reges.org> <3BE853FD.513040F@reges.org> <3BEAA91E.E505C43E@cfmu.eurocontrol.int> <3BEB04B0.27592F17@reges.org> Subject: Re: Joint Strike Fighter X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2615.200 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2615.200 Message-ID: <2T0L7.179187$3d2.7869703@bgtnsc06-news.ops.worldnet.att.net> Date: Thu, 22 Nov 2001 06:25:02 GMT NNTP-Posting-Host: 12.89.147.15 X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc06-news.ops.worldnet.att.net 1006410302 12.89.147.15 (Thu, 22 Nov 2001 06:25:02 GMT) NNTP-Posting-Date: Thu, 22 Nov 2001 06:25:02 GMT Organization: AT&T Worldnet Xref: archiver1.google.com comp.lang.ada:16826 Date: 2001-11-22T06:25:02+00:00 List-Id: Rex Reges wrote : > > > Ian Wild wrote: ... > > AFAIK structure assignment was added to C sometime in the > > late seventies. You really ought to upgrade your compiler. > > Hmmm, I must have missed that in my ANSI C manual. A function > can return a structure, but I must have been using strmov and > memmov for no good reason, eh? It's good to hear. > There is no strmov, and the str* C standard library routines are for strings (in C, consecutive memory bytes until a null character = code 0) and not appropriate for structs -- except the trivial case of a struct containing only a character array used as a string, and even then it would be better to apply the str* routines to the char array member not the struct. memcpy would be the normal untyped way of copying (assigning) any data type. memmove (with an e) is needed only if the source and target are or may be overlapped, which cannot normally occur for a struct type; the usual case is shifting text or arbitrary data around within a buffer. -- - David.Thompson 1 now at worldnet.att.net