Discuss Scratch
- Discussion Forums
- » Show and Tell
- » BCTPLAS - how to use
- benjaminouiesco
- Scratcher
1 post
BCTPLAS - how to use
Hello, this is Benjaminouiesco, creator of pkoo's adventure!
This is BCTPLAS, my programming language.
By the way, BCTPLAS stands for Benjaminouiesco's Text Programming LAnguage in Scratch.
Here is the project.
USER INTERFACE
The BCTPLAS panel shows the output of the program
The code panel shows the code
The alert is displayed under the panels. It is normally hidden, but can be programmed to show, hide, and display different things.
The ask box can be programmed to pop up and request user input. Manipulation of this input is coming with variable support.
The buttons are, from left to right,
Input (green, plus sign) - adds a line at the end
Insert (purple, arrow and lines) - adds a line at a specified place
Delete (red, minus sign) - deletes a line
Clear (dark red, trash can) - clears the whole program
Edit (yellow, pencil) - edits an existing line
Run (orange, play button) - runs the program
When you click the play button, all the buttons disappear, your program is run, and a new button appears, the stop button, to stop your program.
COMMANDS
Basic
Say:
Say is a basic command. It is used in almost all ETPLAS programs.
How to use:
Type “say” and then a space and then whatever you want the program to say.
Example program:
Here is a basic hello world program:
Say Hello world!
Wait:
How to use:
Type “wait” and then a space and then the time you want to wait in seconds.
Example program:
This program waits 5 seconds:
Wait 5
Clear:
How to use:
Type “clear”. That's all.
Example program:
This program clears the screen:
Clear
That's all it does anyway.
User input
Ask:
How to use:
Type ask and then what you want to ask
Example program
This program asks you your name:
Ask what's your name?
Control flow
Gotoline:
How to use:
Type “gotoline” and then a space and then the line number to go to.
Example:
This program redirects the command flow to line 3.
Gotoline 3
Alert
Alert.show and .hide
How to use:
Type “alert.show” to show the alert, and “alert.hide” to hide it.
Example:
This program shows the alert, waits one second, and hides it:
Alert.show
Wait 1
Alert.hide
Alert.say:
How to use:
Type “alert.say” followed by text to set the alert.
Example:
This program shows the alert and makes it say “Example alert”.
Alert.show
Alert.say Example alert
COMMENTING
You can also post a comment, a line of “code” that does nothing. Just put a apostrophe (') before what you want to write.
Example:
Here is a commented line of code:
Say hello
'prints “hello” on the BCTPLAS panel.
You can also have a blank line.
TECHNIQUES
Looping
Finite variable-length loops are not supported yet, but infinite loops can be made with the gotoline. Here is a program that keeps printing “hello” on the BCTPLAS panel:
Say hello
Wait 1
Gotoline 1
This is BCTPLAS, my programming language.
By the way, BCTPLAS stands for Benjaminouiesco's Text Programming LAnguage in Scratch.
Here is the project.
USER INTERFACE
The BCTPLAS panel shows the output of the program
The code panel shows the code
The alert is displayed under the panels. It is normally hidden, but can be programmed to show, hide, and display different things.
The ask box can be programmed to pop up and request user input. Manipulation of this input is coming with variable support.
The buttons are, from left to right,
Input (green, plus sign) - adds a line at the end
Insert (purple, arrow and lines) - adds a line at a specified place
Delete (red, minus sign) - deletes a line
Clear (dark red, trash can) - clears the whole program
Edit (yellow, pencil) - edits an existing line
Run (orange, play button) - runs the program
When you click the play button, all the buttons disappear, your program is run, and a new button appears, the stop button, to stop your program.
COMMANDS
Basic
Say:
Say is a basic command. It is used in almost all ETPLAS programs.
How to use:
Type “say” and then a space and then whatever you want the program to say.
Example program:
Here is a basic hello world program:
Say Hello world!
Wait:
How to use:
Type “wait” and then a space and then the time you want to wait in seconds.
Example program:
This program waits 5 seconds:
Wait 5
Clear:
How to use:
Type “clear”. That's all.
Example program:
This program clears the screen:
Clear
That's all it does anyway.
User input
Ask:
How to use:
Type ask and then what you want to ask
Example program
This program asks you your name:
Ask what's your name?
Control flow
Gotoline:
How to use:
Type “gotoline” and then a space and then the line number to go to.
Example:
This program redirects the command flow to line 3.
Gotoline 3
Alert
Alert.show and .hide
How to use:
Type “alert.show” to show the alert, and “alert.hide” to hide it.
Example:
This program shows the alert, waits one second, and hides it:
Alert.show
Wait 1
Alert.hide
Alert.say:
How to use:
Type “alert.say” followed by text to set the alert.
Example:
This program shows the alert and makes it say “Example alert”.
Alert.show
Alert.say Example alert
COMMENTING
You can also post a comment, a line of “code” that does nothing. Just put a apostrophe (') before what you want to write.
Example:
Here is a commented line of code:
Say hello
'prints “hello” on the BCTPLAS panel.
You can also have a blank line.
TECHNIQUES
Looping
Finite variable-length loops are not supported yet, but infinite loops can be made with the gotoline. Here is a program that keeps printing “hello” on the BCTPLAS panel:
Say hello
Wait 1
Gotoline 1
- Atusiff
- Scratcher
100+ posts
BCTPLAS - how to use
Sounds Complicated and Fun!
hi! i'm atusiff – have a great day!
- Discussion Forums
- » Show and Tell
- » BCTPLAS - how to use