Re: Curious question for act.comm.c

From: Carlos Myers (
Date: 09/01/01

From: "Del" <>
> Artovil wrote:
> > >In this function, where is buf1 and buf2 comming from? (are they not
> > >here?) Or am I missing somthing to understand what you're refering to?
> >
> > buf1 and buf2 are coming from the prompt, the player types write paper
> > where paper = buf1, and pen = buf2, and to clarify that inside the
> > they are set papername = buf1, penname = buf2, and so forth.
> >
> HUH??
> Where are you getting buf1 and buf2 from? The 'argument' is passed to
> ACMD(do_write) not buf1 and buf2, penname and papername are then set to
> and buf2. Directly after it, they are being RESET to the two_arguments.
> Why?

Penname and papername are pointers that reference buf1 and buf2.  In other
words, they don't copy the data in buf1 and buf2, but do point to where buf1
and buf2 are located in memory.  They then pass the reference to
two_arguments, which manipulates buf1 and buf2 directly.


   | FAQ: |
   | Archives: |

This archive was generated by hypermail 2b30 : 12/06/01 PST