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!

CLS DIM sb AS SIGNED BYTE, ub AS BYTE DIM sw AS SIGNED WORD, uw AS WORD DIM sd AS SIGNED DWORD, ud AS DWORD PRINT " 8>16) "; sb = -42: sw = sb: IF sw <> -42 THEN: PRINT "(1)";: ENDIF sb = -42: uw = sb: IF uw <> $FFD6 THEN: PRINT "(2)";: ENDIF ub = 192: sw = ub: IF sw <> 192 THEN: PRINT "(3)";: ENDIF ub = 192: uw = ub: IF uw <> 192 THEN: PRINT "(4)";: ENDIF PRINT PRINT " 8>32) "; sb = -42: sd = sb: IF sd <> -42 THEN: PRINT "(1)";: ENDIF sb = -42: ud = sb: IF ud <> $FFFFFFD6 THEN: PRINT "(2)";:ENDIF ub = 42: sd = ub: IF sd <> 42 THEN: PRINT "(3)";: ENDIF ub = 42: ud = ub: IF ud <> 42 THEN: PRINT "(4)";: ENDIF PRINT PRINT "16> 8) "; sw = -42: sb = sw: IF sb <> -42 THEN: PRINT "(1)";: ENDIF sw = -42: ub = sw: IF ub <> $D6 THEN: PRINT "(2)";: ENDIF uw = 42: sb = uw: IF sb <> 42 THEN: PRINT "(3)";: ENDIF uw = 42: ub = uw: IF ub <> 42 THEN: PRINT "(4)";: ENDIF PRINT PRINT "16>32) "; sw = -42: sd = sw: IF sd <> -42 THEN: PRINT "(1)";: ENDIF sw = -42: ud = sw: IF ud <> $FFFFFFD6 THEN: PRINT "(2)";: ENDIF uw = 42: sd = uw: IF sd <> 42 THEN: PRINT "(3)";: ENDIF uw = 42: ud = uw: IF ud <> 42 THEN: PRINT "(4)";: ENDIF PRINT PRINT "32> 8) "; sd = -42: sb = sd: IF sb <> -42 THEN: PRINT "(1)";: ENDIF sd = -42: ub = sd: IF ub <> $D6 THEN: PRINT "(2)";: ENDIF ud = 42: sb = ud: IF sb <> 42 THEN: PRINT "(3)";: ENDIF ud = 42: ub = ud: IF ub <> 42 THEN: PRINT "(4)";: ENDIF PRINT PRINT "32>16) "; sd = -42: sw = sd: IF sw <> -42 THEN: PRINT "(1)";: ENDIF sd = -42: uw = sd: IF uw <> $FFD6 THEN: PRINT "(2) = ";uw: ENDIF ud = 42: sw = ud: IF sw <> 42 THEN: PRINT "(3)";: ENDIF ud = 42: uw = ud: IF uw <> 42 THEN: PRINT "(4)";: ENDIF PRINT

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.