BBC BASIC for Windows
« FNpsinput function »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 10:26pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: FNpsinput function  (Read 898 times)
Wendell
New Member
Image


member is offline

Avatar




PM


Posts: 28
xx FNpsinput function
« Thread started on: Mar 23rd, 2014, 06:07am »

*font Segoe print,11,B
PRINT TAB(32,10) "First Name: "

INPUT TAB(42,10)a$

PRINT TAB(30,11) " TENMADS : ";

INPUT TAB(45,21)b$




What is the format to correct the input statment.. for the above program will not, backspace correctly ?
User IP Logged

kingsmiller
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 13
xx Re: FNpsinput function
« Reply #1 on: Mar 23rd, 2014, 08:28am »

Quote:
*font Segoe print,11,B
PRINT TAB(32,10) "First Name: "

INPUT TAB(42,10)a$

PRINT TAB(30,11) " TENMADS : ";

INPUT TAB(45,21)b$



I have updated your code hoping that this is what you meant -

Code:
     *font Segoe print,11,B

      INPUTTAB(32,10)"First Name: ";a$

      INPUTTAB(32,12)"TENMADS ";b$
 


If you are querying on how to use the INPUT Keyword correctly then these two Wiki links may help and then is always the 'Help Topics' and 'Tutorial' -

http://www.bbcbasic.co.uk/bbcwin/manual/bbcwin5.html#input

http://www.bbcbasic.co.uk/bbcwin/tutorial/chapter08.html

Regards ..
« Last Edit: Mar 23rd, 2014, 08:52am by kingsmiller » User IP Logged

rtr
Guest
xx 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 » User IP Logged

Wendell
New Member
Image


member is offline

Avatar




PM


Posts: 28
xx 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
User IP Logged

rtr
Guest
xx 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?? rolleyes

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.
User IP Logged

Wendell
New Member
Image


member is offline

Avatar




PM


Posts: 28
xx 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
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls