PAGES ETC.

Post Reply
Gpjma
Posts: 5
Joined: Mon Jan 08, 2018 10:20 pm
My devices: Ipad pro 12 inch, ipad pro 9 inch, MacBook Air, MacBook Pro, surface pro, HP stealth, samsung Galaxy tab. Toshiba satellite.
Location: Brisbane, AUSTRALIA
Flag: Australia

PAGES ETC.

Post by Gpjma »

Hello all.
Can I get some clarification please regarding the use of PAGES. I have read the excellent manual and looked over the code snippet on the forum although I haven't entered and run the code.
I have this code in a simple programme
PAGE C$ SET
PAGE C$ COLOR .3,.3,.3,1
BUTTON B$ TEXT "CALCULATE" AT 70,600 SIZE 140,40
FOR I= 1 TO 100 !NEXT I

GOTO 10
When I run this code the C$ Page appears but the button that I want there isn't.
I am sure its a simple thing but I cant see it unfortunately.
Also in this snippet I have a time delay, ie FOR I = 1 TO 100. This is to delay the return to line 10 but regardless of value the return is instantaneous.
Hope that you can advise.

Cheers and thanks :(
GPJMA
Thanks for your collective assistance :geek:

Henko
Posts: 814
Joined: Tue Apr 09, 2013 12:23 pm
My devices: iPhone,iPad
Windows
Location: Groningen, Netherlands
Flag: Netherlands

Re: PAGES ETC.

Post by Henko »

Gpjma wrote:
Sun Jan 14, 2018 10:34 pm
Hello all.
Can I get some clarification please regarding the use of PAGES. I have read the excellent manual and looked over the code snippet on the forum although I haven't entered and run the code.
I have this code in a simple programme
PAGE C$ SET
PAGE C$ COLOR .3,.3,.3,1
BUTTON B$ TEXT "CALCULATE" AT 70,600 SIZE 140,40
FOR I= 1 TO 100 !NEXT I

GOTO 10
When I run this code the C$ Page appears but the button that I want there isn't.
I am sure its a simple thing but I cant see it unfortunately.
Also in this snippet I have a time delay, ie FOR I = 1 TO 100. This is to delay the return to line 10 but regardless of value the return is instantaneous.
Hope that you can advise.

Cheers and thanks :(
GPJMA
Hi,

In the presented piece of code , the button name b$ is empty (""), and causes a runtime error. If b$ is not empty, then the button is shown.

An empty for-next loop with 100 iterations takes less than 1 millisecond, i guess.
Use the PAUSE X statement, X being the # of seconds to pause, i.e. PAUSE 0.5

Post Reply