? Wrongly typed variables outside of functions (Page 1) ● SmileBASIC Source Forums

Sign In

*Usernames are case-sensitive
Forgot my password

Wrongly typed variables outside of functions

  • #1 ✎ 1407 12Me21 Admin Syntax Highlighter Received for creating the code syntax highlighter on SBS Night Person I like the quiet night and sleep late. Express Yourself Second Year My account is over 2 years old Website Type suffixes on function arguments don't do anything: TEST "STRING" DEF TEST NUMBER ?NUMBER 'this will be a string not ending in $ END You can get the same results outside of functions! GOTO @SKIP DIM NUMBER[0] @SKIP NUMBER="STRING" 'now NUMBER is a string! These variables act the same as OUT variables in functions. You can assign any value to them and they'll become that type. DEF TEST OUT NUMBER NUMBER="STRING" END Posted Edited by 12Me21