Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!batcomputer!cornell!vax5!q4kx From: q4kx@vax5.cit.cornell.edu (Joel Sumner) Newsgroups: comp.sys.apple2 Subject: new() procedure in Pascal Message-ID: <5429.26ec0e29@vax5.cit.cornell.edu> Date: 11 Sep 90 02:05:29 GMT Distribution: comp Lines: 24 One more Pascal related question. When should I call the following? var p:pointer (or StringPtr, or anything pointer) begin .... new(p); .... end; In other words, when do you have to call new()? Only when it is defined in 'var' headings? Only global 'var' headings? How about as value parameters of a procedure/function? I was writing a program that kept crashing (corrputed string) until I called new(mystringptr). But I have made other programs before that do similar things and I never used new(). I am confused. Someone please help me. Thanks -- Joel Sumner GENIE:JOEL.SUMNER These opinions are q4kx@cornella.ccs.cornell.edu q4kx@cornella warranted for 90 days or q4kx@vax5.cit.cornell.edu q4kx@crnlvax5 60,000 miles. Whichever .................................................... comes first. Never test for an error condition that you can't handle.