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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,54c513170bafd693 X-Google-Attributes: gid103376,public From: Keith Thompson Subject: Re: Desirability of C++ Date: 2000/05/02 Message-ID: #1/1 X-Deja-AN: 618562007 Sender: kst@king.cts.com References: <390DEC7F.9429C82C@online.no> <8emhtk$pka4@ftp.kvaerner.com> X-Trace: thoth.cts.com 957329764 49821 205.163.0.22 (3 May 2000 04:56:04 GMT) Organization: CTS Network Services Newsgroups: comp.lang.ada X-Complaints-To: newsmaster@cts.com Date: 2000-05-02T00:00:00+00:00 List-Id: randhol+nospam@pvv.org (Preben Randhol) writes: [...] > As I cannot remember much of turbopascal I curious: > > If you write in turbopascal. > > line : string[12]; > short_line : string[5]; > line := "Hello World!"; > short_line := line; > > would short_line be "Hello" or will it be altered to a string[12] and > thus contain all of line? I've never used Turbo Pascal, but I believe it was based on UCSD Pascal, which I have used. In UCSD Pascal, an assignment like the above would result in an overflow, which would terminate the program. (The Ada equivalent would be to raise Constraint_Error.) -- Keith Thompson (The_Other_Keith) kst@cts.com San Diego Supercomputer Center <*> Welcome to the last year of the 20th century.