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 POSITIVE CONST bit0 = 0 POSITIVE CONST bit1 = 1 DIM b0 AS BIT = bit0 DIM b1 AS BIT = bit1 DIM u0 AS BYTE = 0 DIM u1 AS BYTE = $ff DIM w0 AS WORD = 0 DIM w1 AS WORD = $ffff DIM d0 AS WORD = 0 DIM d1 AS WORD = $ffffffff PRINT "(bit 0) = " IF b0 = u0 THEN PRINT " (byte 0) " ENDIF IF b0 = w0 THEN PRINT " (word 0) " ENDIF IF b0 = d0 THEN PRINT " (dword 0) " ENDIF PRINT PRINT "(bit 1) = " IF b1 = u1 THEN PRINT " (byte $ff) " ENDIF IF b1 = w1 THEN PRINT " (word $ffff) " ENDIF IF b1 = d1 THEN PRINT " (dword $fffffff) " 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.