REPEAT with special key codes

Kenneth Brody kenbrody at bestweb.net
Tue May 2 17:31:54 PDT 2006


Quoting Barry Wiseman (Tue, 02 May 2006 15:56:56 -0400):

> Here I go again attempting to use the online docs.  Silly me.  Anybody
> know if this can work?
>
> http://fptech.com/Products/Docs/fpmanhtm/references/commands/repeat().htm
> shows the following example:
>
>     Use PUSHKEY to push 10 right-arrow keys
>
>         Then: pushkey repeat ("[CRGT]","10")

The example is wrong.

> I tried doing this today, but only a single [CRGT] was performed.  It
> seems REPEAT doesn't want a special key code in the first arg.

REPEAT() doesn't take "special key codes".  It takes a string of
characters.  How you wish to handle the string that REPEAT() returns
is up to you, and irrelevent to REPEAT() itself.

> The output of my test program
>
> 	::end:
> 	@KEYT::zz(50,*)=repeat("[CRGT]","5"); errorbox zz:
>
> is:
>
> 	[CRGT

That is exactly what it should return.  You asked for 5 characters,
created by "repeating" the string "[CRGT]".

The string "[CRGT]" is 6 characters long.  To get five copies of it,
you need 30 characters:

    REPEAT("[CRGT]","30")

[...]
> and moved on, but still curious for the future: can REPEAT be used this
> way, or is this more info in the online docs that's Just Plain Wrong?

JPW.

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list