Please help
- dE.niz
- Posts: 17
- Joined: Tue Jan 27, 2015 10:35 am
- My devices: Ipad 2 / iphone 4s / macbook / imac .
- Location: Belgium
- Flag:
Please help
Hello
What is wrong here, I can not find the solution in the manual.
Please help Smart Basic is a great app but the manual is not a very helpful assistance.
Sorry for the bad words.
rem button
button "push" title "Druk toets "at 100,250 size 230,80
do
if button_pressed("push")then graphics clear
if "push" = 1 then break
until "push" < 1
dE.niz
What is wrong here, I can not find the solution in the manual.
Please help Smart Basic is a great app but the manual is not a very helpful assistance.
Sorry for the bad words.
rem button
button "push" title "Druk toets "at 100,250 size 230,80
do
if button_pressed("push")then graphics clear
if "push" = 1 then break
until "push" < 1
dE.niz
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Please help
Please explain what you want to get from your program, for each and every line.
- Dutchman
- Posts: 851
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
Re: Please help
You are right, that remark is very unfriendly.dE.niz wrote:
Please help Smart Basic is a great app but the manual is not a very helpful assistance.
Sorry for the bad words.
The manual is NOT a tutor on programming.
You'll have to learn what variables are and much much more.
Start reading examples and try to change certain things.
And keep in mind that nobody is obliged to give you an answer.
- Dutchman
- Posts: 851
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
Re: Please help
Maybe this could be a starter for you
Code: Select all
rem button
REM Comments by Dutchman
REM the first two lines make sense, the rest is 'bagger' in Dutch
button "push" title "Druk toets "at 100,250 size 230,80
do
/*
if button_pressed("push")then graphics clear
>>> "push" is a 'string' and NOT a variable
>>> you could use 'push' as a variable
if "push" = 1 then break
until "push" < 1
*/
REM you did not give the command GRAPHICS
REM so the program is in TEXT view
IF BUTTON_PRESSED("push") THEN TEXT CLEAR
PAUSE 0.1
PRINT "?";
UNTIL 0 ' keep doing
END 'a program should have a proper END
- dE.niz
- Posts: 17
- Joined: Tue Jan 27, 2015 10:35 am
- My devices: Ipad 2 / iphone 4s / macbook / imac .
- Location: Belgium
- Flag:
Re: Please help
Hello
The program is just a learning test. Nothing special.
I 'm trying to understand the examples.
I have a little experience for basic programming. I know wat variables and strings are.
And yes i have a book to learn basic.
Here is my test program.
rem graphics mode
graphics
graphics clear 1,1,1
rem blauwe rand
rem ld= line size
ld=10
draw size ld
draw color 0,0,1
draw rect 20,20 to 745,960
rem titel
draw font name "courier-bold"
draw font size 100
draw color 1,.4,.5
draw text "Titel."at 100,100
draw line 100,210 to 400,210
rem knop
button "push" title "Druk toets "at 100,250 size 230,80
do
if button_pressed("push")then graphics clear rem why brackets around the name ("push")
if "push"= 1 then break
until "push"< 1
Sorry for the bad words it will not happen again
I just want some help.
Thank you Mr Kibernetik.
The program is just a learning test. Nothing special.
I 'm trying to understand the examples.
I have a little experience for basic programming. I know wat variables and strings are.
And yes i have a book to learn basic.
Here is my test program.
rem graphics mode
graphics
graphics clear 1,1,1
rem blauwe rand
rem ld= line size
ld=10
draw size ld
draw color 0,0,1
draw rect 20,20 to 745,960
rem titel
draw font name "courier-bold"
draw font size 100
draw color 1,.4,.5
draw text "Titel."at 100,100
draw line 100,210 to 400,210
rem knop
button "push" title "Druk toets "at 100,250 size 230,80
do
if button_pressed("push")then graphics clear rem why brackets around the name ("push")
if "push"= 1 then break
until "push"< 1
Sorry for the bad words it will not happen again
I just want some help.
Thank you Mr Kibernetik.
- Dutchman
- Posts: 851
- Joined: Mon May 06, 2013 9:21 am
- My devices: iMac, iPad Air, iPhone
- Location: Netherlands
- Flag:
Re: Please help
… and thanks Dutchman
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Please help
Yes, thank you Dutchman! And thank you Henko!Dutchman wrote:… and thanks Dutchman
Here BUTTON is the command:
Code: Select all
button "push" title "Druk toets "at 100,250 size 230,80
Code: Select all
if button_pressed("push")then graphics clear
I cannot understand what do you want to get from this code:
Code: Select all
if "push"= 1 then break
until "push"< 1
- dE.niz
- Posts: 17
- Joined: Tue Jan 27, 2015 10:35 am
- My devices: Ipad 2 / iphone 4s / macbook / imac .
- Location: Belgium
- Flag:
Re: Please help
I'm very sorry Dutchman i didnt see your post.
I feel so stupid.
dE.niz
I feel so stupid.
dE.niz
- dE.niz
- Posts: 17
- Joined: Tue Jan 27, 2015 10:35 am
- My devices: Ipad 2 / iphone 4s / macbook / imac .
- Location: Belgium
- Flag:
Re: Please help
rem knop
button "push" title "Druk toets "at 100,250 size 230,80
do
if button_pressed("push")then graphics clear
if "push"= 1 then break
until "push" <1
The program is not finished.
If button_pressed ("push")then graphics clear rem clear the page when button is pressed
I just want a empty page.
If "push" =1 then break Just go out the loop by 1
Thank you
button "push" title "Druk toets "at 100,250 size 230,80
do
if button_pressed("push")then graphics clear
if "push"= 1 then break
until "push" <1
The program is not finished.
If button_pressed ("push")then graphics clear rem clear the page when button is pressed
I just want a empty page.
If "push" =1 then break Just go out the loop by 1
Thank you
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Please help
Then you can make it like this:
In first line it cycles while button "push" is not pressed.
Second line is continuation of the program.
Code: Select all
1 IF BUTTON_PRESSED("push") == 0 THEN 1
GRAPHICS CLEAR
Second line is continuation of the program.