Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need assistance with Dimensioning

Author
Message
Alpha Omega
20
Years of Service
User Offline
Joined: 13th May 2004
Location:
Posted: 6th Jun 2004 20:46
OK
I have a variable a = 1
I am typing a name from the keyboard

wait key
npk$ = inkey$()

I want cpn$(a) , a = 1 at this time, to be the first letter

I thought cpn$(a) = npk$ would work

It does not - keeps coming up as a type mismatch

my thought was to increase the vaule of a for each letter

say I typed in the name Mike

a = 1
cpn$(a) = "m" so cpn$(1) would be m
a = a + 1 a now = 2
cpn$(a) = "i" so cpn$(2) would be i
a = a + 1 a now = 3
cpn$(a) = "k" so cpn$(3) would be k

and so forth

even if I use

dim cpn$(15)

it still comes up a type mismatch

what format does DBPro want ???????????????
to do this

Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 6th Jun 2004 21:28
this works fine here, maybe some conflict in your code?



try that and it it does work then you may have some kind of code error you overlooked or something.

Mentor.

PC1: P4 hyperthreading 3ghz, 1gig mem, 2x160gig hd`s, Nvidia FX5900 gfx, 6 way surround sound, PC2: AMD 1.2ghz, 512mb ram, FX5200 ultra gfx, stereo 16 bit soundblaster, ups.
Alpha Omega
20
Years of Service
User Offline
Joined: 13th May 2004
Location:
Posted: 7th Jun 2004 00:52

thanks for the tip Mentor
the repeat command seems to work

DBPro debug [F6] option does not work on my system
have to do it all on paper
makes for writing programs very looong
I must be missing something in my code somewhere

Thanks again

Login to post a reply

Server time is: 2024-09-22 12:34:11
Your offset time is: 2024-09-22 12:34:11