⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sbms.txt

📁 smallbasic for linux
💻 TXT
字号:
Mathematics:____________________________All angles are in RADs.ABS(x) - Absolute value of xCOS(x) - Cosine of xSIN(x) - Sine of xTAN(x) - Tangent of xACOS(x) - Arc cosine of xASIN(x) - Arc sine of xATAN(x) - Arc tangent of xATAN2(x,y) - Arc tangent  of two variablesHyperbolic functions:COSH(x), SINH(x), TANH(x)ACOSH(x), ASINH(x), ATANH(x)EXP(x) - the value of e  raised to the power of xLOG(x) - natural logarithm  of xLOG10(x) - the base-10  logarithm of xPOW(x,y) - x raised to  power of ySQR(x) - square root of xINT(x) - rounds x downwards  to the nearest integerFIX(x) - rounds x upwards  to the nearest integerROUND(x [,decs])  rounds the x to the  nearest integer or  fp with 'decs' decimal  digits.SGN(x) - sign of x  +1 for positive,  -1 for negative and   0 for zeroDEG(x) - rads to degreesRAD(x) - degrees to rads____________________________MAX(...), MIN(...)Maximum/Minimum value ofparameters. Parameters canbe anything (arrays, ints,reals, strings).Example:? MAX(3,4,8)? MIN(array(),2,3)? MAX("abc","def")____________________________Strings:____________________________LEN(s) - length of stringSPACE$(n) - returns a string  of 'n' spacesOCT$(x) - octal value string  of xHEX$(x) - hexadecimal value  string of xVAL(s) - numeric value of  string sSTR$(x) - convert x to   stringASC(s) - ASCII code of first  character of sCHR$(x) - returns one-char  string of character with  ASCII code x____________________________LCASE$(s), UCASE$(s)Converts the string s to lower/upper caseExample:? LCASE$("Hi"):REM hi? UCASE$("Hi"):REM HI____________________________LTRIM$(s), RTRIM$(s)Removes leading/trailingspaces from string s? LEN(LTRIM$("  Hi")):REM 2____________________________LEFT$(s,n), RIGHT$(s,n)Returns the n number ofleftmost/rightmost charsof string s____________________________MID$(s, start [,length])Returns the part (length)of the string s startingfrom 'start' positionIf the 'length' parameter isomitted, MID$ returns thewhole string from the pos.'start'.____________________________INSTR([start,] s1, s2)Returns the position of thefirst occurrence of thestring s2 into string s1(starting from the position'start')If there is no match, INSTRreturns 0____________________________STRING$(len,{ascii|str})____________________________SPLIT string, delimiters,  words()Returns the words of thespecified string into array 'words'Example:s$="/etc/temp/filename.ext"SPLIT s$, "/.", v()FOR i=0 TO UBOUND(v)  PRINT i;" [";v(i);"]"NEXTdisplays:0 []1 [etc]2 [temp]3 [filename]4 [ext]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -