Type your ugBASIC program here (remember: keywords like PRINT must be UPPERCASE!).
Click on Build menu to select the target: you will download the compiled binary file!

CONST applicationName = "ugchat" DO CLS PRINT "===========" PRINT "CHAT CLIENT" PRINT "===========" WHILE NOT PING() PRINT "."; WAIT 300 MS WEND PRINT INPUT "USERNAME: ", username$ INPUT "PASSWORD: ", password$ PRINT PRINT "CONNECTING TO SERVER: "; player = LOGIN(username$, password$) IF SUCCESS(player) THEN PRINT "OK" PRINT "CREATING PORT: "; port = CREATE PORT(player,applicationName) IF SUCCESS(port) THEN PRINT "OK" DO INPUT "RECIPIENT: ", recipient$ port2 = FIND PORT(player,recipient$,applicationName) IF SUCCESS(port2) THEN DO WHILE PEEK MESSAGE(port) PRINT recipient$;"> ";GET MESSAGE(port) WEND TIMER = 0 WHILE ( c$ = "" ) AND ( TIMER < ( TICKS PER SECOND / 2 ) ) c$ = INKEY$ IF c$<>"" THEN PUT KEY c$ INPUT ">",message$ IF message$<>"" THEN PUT MESSAGE port2, message$ ENDIF c$ = "" ENDIF WEND LOOP ELSE PRINT "ERROR: RECIPIENT UNAVAILABLE" WAIT KEY RELEASE ENDIF LOOP ELSE PRINT "ERROR: CANNOT CREATE PORT" WAIT KEY RELEASE ENDIF ELSE PRINT "ERROR: ACCESS DENIED!" WAIT KEY RELEASE ENDIF LOOP

Welcome to the ugBASIC sandbox!

This tool was designed to quickly test whether the code you are writing compiles correctly and determines the desired results. Since the source is compiled thanks to dedicated servers, separate from the browser you are using, some commands are not available: for example, you cannot load external files or resources by using the LOAD command. If you need to develop a program with a complete tool, we recommend installing the executables or the UGBASIC-IDE.

Unless required by applicable law or agreed to in writing, this website is given on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.