Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!think.com!zaphod.mps.ohio-state.edu!wuarchive!uunet!mcsun!ukc!icdoc!sot-ecs!snb90 From: snb90@uk.ac.soton.ecs (Stewart Brodie) Newsgroups: comp.sys.acorn Subject: Answer: Problem with procedures in BASIC Message-ID: <8009@ecs.soton.ac.uk> Date: 6 Jun 91 11:50:14 GMT References: <7970@ecs.soton.ac.uk> Sender: news@ecs.soton.ac.uk Organization: University of Southampton Lines: 19 Originator: snb90@gloriana Thank you for all the comments, but I have found the problem and corrected it. For those who are interested : The fault is that my window name was TOO SHORT!! In the PRM it states that: "If you use wildcards .. there must be enough space to put the full name of the template in memory" However, it seems that it is necessary to have enough space for all the template names preceding the one you want in the file. I changed the name of the ELM window to ELMW (thus forcing BASIC to allocate more stack memory for the string, (5 bytes - E,L,M,W,\0)) and everything worked fine. The problem is basically that BASIC wasn't allocating enough stack space to hold the string when doing the SYS call. Stewart Brodie