Author |
Topic: FNpsinput function (Read 902 times) |
|
rtr
Guest
|
 |
Re: FNpsinput function
« Reply #2 on: Mar 23rd, 2014, 10:15am » |
|
on Mar 23rd, 2014, 06:07am, Wendell wrote:| What is the format to correct the input statment.. for the above program will not, backspace correctly ? |
|
You answered the question in your subject line: use the FNpsinput routine. However that routine, unmodified, does not work well with italic characters so in the code below I've added a SYS "SetBkMode" to resolve the issue:
Code: SYS "SetBkMode", @memhdc%, 1
*font Segoe Print,11,B
PRINT TAB(32,10) "First Name: ";
a$ = FNpsinput(42,10,"")
PRINT TAB(32,11) "TENMADS : ";
b$ = FNpsinput(45,11,"") As the previous respondent noted you could incorporate the prompt string into the function call, but in so doing it's more difficult to position the cursor exactly where you want it, so I don't necessarily recommend it:
Code: SYS "SetBkMode", @memhdc%, 1
*font Segoe Print,11,B
a$ = FNpsinput(32,10,"First Name: ")
b$ = FNpsinput(32,12,"TENMADS : ") Richard.
|
| « Last Edit: Mar 23rd, 2014, 11:22am by rtr » |
Logged
|
|
|
|
Wendell
New Member
member is offline


Posts: 28
|
 |
Re: FNpsinput function
« Reply #3 on: Mar 23rd, 2014, 2:18pm » |
|
SYS "SetBkMode", @memhdc%, 1 *font Segoe Print,11,B PRINT TAB(32,10) "First Name: "; a$ = FNpsinput(42,10,"") PRINT TAB(32,11) "TENMADS : "; b$ = FNpsinput(45,11,"")
IF you run this ... a$ = FNpsinput(42,10,""),,,, no such FN/PROC error mess
|
|
Logged
|
|
|
|
rtr
Guest
|
 |
Re: FNpsinput function
« Reply #4 on: Mar 23rd, 2014, 3:19pm » |
|
on Mar 23rd, 2014, 2:18pm, Wendell wrote:| no such FN/PROC error mess |
|
I hardly dare ask this, but have you actually copied-and-pasted FNpsinput into your program?? 
You will save yourself a great deal of time and frustration if you develop a better understanding of the fundamentals of BBC BASIC. Once again I would strongly urge you to work through the Beginners' Tutorial, which you can access from the Help menu (the second item after Help Topics). Please note that the Tutorial is not the same thing as the BB4W Help documentation - one or two of your previous comments make me wonder whether you have muddled them up.
Richard.
|
|
Logged
|
|
|
|
Wendell
New Member
member is offline


Posts: 28
|
 |
Re: FNpsinput function
« Reply #5 on: Mar 23rd, 2014, 3:25pm » |
|
Sorry i did copy it to my program ... And i am reading tutorial sometime i get confuse .i will reread and try it again . old guy
|
|
Logged
|
|
|
|
|