🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #1437

Re: BC++ Far new()

#1437
From: Fergus James HENDERSON
Date: Fri, 11 Sep 1992 10:35
68 lines
2133 bytes
gin503@cdc835.cdc.polimi.it (Maurizio Sartori Masar) writes:

>bu254@cleveland.Freenet.Edu (Stephen Groundwater) writes:
>
>>
>>char far *MyBuf;
>>MyBuf=(char far *)new[100L];
>>
>>Voila, 100 bytes of far memory, the important bit is the L.
>>
>>Steve>
>
>Look this program :
>
>/**************************/
>#include <stdio.h>
>
>void far * operator new( unsigned long size );
>
>int main ()
>   {
>   char far * alpcStringArray [10];
>
>   for (int i = 0; i < 10; i++)
>      {
>      alpcStringArray[i] = new (char[10000L]);
>
>      printf ("Array %i is %Fp\n", i, alpcStringArray[i]);

Don't you mean
       printf ("Array %i is %Fp\n", i, & alpcStringArray[i]);
	 	   
>      }
>
>   return (0);
>   }
>/**************************/
>
>Its output is :
>
>Array 0 is 1F2F:0792
>Array 1 is 1F2F:2EA6
>Array 2 is 1F2F:55BA
>Array 3 is 1F2F:7CCE
>Array 4 is 1F2F:A3E2
>Array 5 is 1F2F:CAF6
>Array 6 is 1F2F:0000
>Array 7 is 1F2F:0000
>Array 8 is 1F2F:0000
>Array 9 is 1F2F:0000
>
>
>So it uses near malloc() !
>
>How can I call far new() ??
>
>					Maurizio
>
>--
>  ))    ))    ))      ))))))    ))    )))))))      Maurizio Sartori Masar
>  ))))))))  ))  ))   ))))))   ))  ))  ))    ))   gin503@cdc835.cdc.polimi.it
>  )) )) )) ))))))))       )) )))))))) ))))))       Politecnico di Milano
>  ))    )) ))    ))  ))))))  ))    )) ))    ))            ITALY
-- 
Fergus Henderson             fjh@munta.cs.mu.OZ.AU      
This .signature virus is a self-referential statement that is true - but 
you will only be able to consistently believe it if you copy it to your own
.signature file!
Technical Details
Message-ID: <9225520.24060@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
References: <gin503.715957220@cdc835> <18j0e6INN8ju@usenet.INS.CWRU.Edu> <gin503.716024999@cdc835>

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
From: fjh@munta.cs.mu.OZ.AU (Fergus James HENDERSON)
Subject: Re: BC++ Far new()
Message-ID: <9225520.24060@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU
Organization: Computer Science, University of Melbourne, Australia
References: <gin503.715957220@cdc835> <18j0e6INN8ju@usenet.INS.CWRU.Edu> <gin503.716024999@cdc835>
Date: Fri, 11 Sep 1992 10:35:58 GMT
Lines: 68