Article View: comp.lang.oberon
Article #721Re: Oberon/F:Memory functions?
From: skulski
Date: Wed, 20 Dec 1995 17:32
Date: Wed, 20 Dec 1995 17:32
45 lines
1971 bytes
1971 bytes
Somebody asked: >> What is the mechanism to init memory locations (i.e. record structures). In >> Turbo Pascal it was FILLCHAR(<struc>,<Len>,<fillcharacter>). (SETMEM in C I >> believe). For the <Len> paramater, you could also use a built in Turbo >> PASCAL function: >> >> SIZEOF(<struc>), >> >> Does Oberon/F have equivalents for these two Turbo functions? SIZE(anyType) is a standard Oberon procedure. As for physically filling memory locations with some bit patterns, there is no Oberon _language_ standard for this. But there are some such procedures in the SYSTEM module. (PUT, MOVE). You can construct your own FILLCHAR easily from these SYSTEM primitives. In article <199512181436.PAA12680@lillian.inf.ethz.ch>, posva@oberon.ch (Ivan Posva) writes: > Hi, > > All pointers are automatically initialized to NIL in Oberon. Not in Oberon in general. In Oberon/F, maybe? At least my Linux V4 Compiler.Tool reads: Compiler Options: (default values in parenthesis) \x index check (on) \v oberflow check (off) \t type check (on) \s allow generation of new symbol file (off) \p pointer initialisation (on) \a ASSERT evaluation (on) If one wants a bullet-proof code, as much as possible under the cooperative Oberon environment, one should not rely on any compiler option being on/off. (I can tell you some real horror stories about Fortran programs counting on some default INTEGER layout in memory, which was however affected by compiler switches.) Wojtek
Technical Details
Message-ID:
<1995Dec20.123211.1@fermi.nsrl.rochester.edu>Path:
arc1-ca.pugleaf.net!fermi.nsrl.rochester.edu!skulskiReferences:
<199512181436.PAA12680@lillian.inf.ethz.ch>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.oberon Path: arc1-ca.pugleaf.net!fermi.nsrl.rochester.edu!skulski From: skulski@fermi.nsrl.rochester.edu Subject: Re: Oberon/F:Memory functions? Message-ID: <1995Dec20.123211.1@fermi.nsrl.rochester.edu> Sender: news@galileo.cc.rochester.edu Nntp-Posting-Host: nsrlc6.nsrl.rochester.edu Organization: Nuclear Structure Research Laboratory References: <199512181436.PAA12680@lillian.inf.ethz.ch> Date: 20 Dec 95 12:32:11 -0500