From: | Leigh Parry |
Date: | 16 Aug 99 at 09:06:51 |
Subject: | Re: Crashing Phone Prog |
Hello Bippy
On 13-Aug-99, you wrote:
> Hiya Guys,
>
> My latest program will be an up2date Dialling Code Program... Anyway, I have
> run into a small problem..
>
> I have implemented a simple search routine.. which works in the following
> way :
>
> In the GTString you enter either a Place or a Code... or the first letters
> of places your looking for eg... entering DER would list all places that
> start DER (DEERBY, DERRY) and entering D would list all places beginning
> with D...
>
> Anyway when I enter a single letter it hangs??! I don't know why.. so
> attached is the source (Sorry aout the messy code etc..) could one of ya's
> have a look and see if you can see what the problem is?!?
>
> Thanks
>
> Mark
>
I found the problem, you were creating a SPACE$ that was minus in value
try the following
; at top of program insert this line.
spaces$=" " ; 20 spaces
; then replace following routine.
.todisp
areaname$=Left$(areaname$(1)+spaces$,20)
fsort$(c)=areaname$(i)+pad$+dialcode$(i)+"-"+areacode$(i)+" "+cityname$(i)
c+1
RTS
Also, you are mixing the libs, that is using both Chr$ + NChr$, Left$ + NLeft$
this will add to executable length, but you know that ;)
Instead of using the SPACE$ command try doing the above as that will knock
loads of the executable ( if thats the only command from the lib) and also one
version of that command had bugs.
Hope these help.
Leigh.
A1200T - 040-33Mhz +16MbFast - 3.2Gig HD - 32x CD - ZIP
EMail: lparry@free4all.co.uk
URL: http://www.free0024068.free4all.co.uk/
If it jams - force it. If it brakes, it needed replacing anyway.
---------------------------------------------------------------------
To unsubscribe, e-mail: blitz-list-unsubscribe@netsoc.ucd.ie
For additional commands, e-mail: blitz-list-help@netsoc.ucd.ie