def dp = debug pause
-
- Posts: 814
- Joined: Tue Apr 09, 2013 12:23 pm
- My devices: iPhone,iPad
Windows - Location: Groningen, Netherlands
- Flag:
def dp = debug pause
Why does this function definition result in a "syntax error" ??
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Re: def dp = debug pause
This works fine
I was not aware that you could use = to create a def
Code: Select all
dp
END
DEF dp()
DEBUG PAUSE
END DEF
The only thing that gets me down is gravity...
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: def dp = debug pause
It is incorrect to use command instead of a function, but you can use commands inside a multi-line function.
It is an error to write LET A = DEBUG PAUSE because command is not a function. This is why you cannot substitute function with a command. But it is ok to use command in a multi-line user function which is just a sequence of commands.
It is an error to write LET A = DEBUG PAUSE because command is not a function. This is why you cannot substitute function with a command. But it is ok to use command in a multi-line user function which is just a sequence of commands.
-
- Posts: 814
- Joined: Tue Apr 09, 2013 12:23 pm
- My devices: iPhone,iPad
Windows - Location: Groningen, Netherlands
- Flag:
Re: def dp = debug pause
Thanks, mr. K, i understand.
@Ricardobytes: i use the abbreviation
DEF b_p(a$) = BUTTON_PRESSED(a$)
All the time. I hate typing.
@Ricardobytes: i use the abbreviation
DEF b_p(a$) = BUTTON_PRESSED(a$)
All the time. I hate typing.