plirof2

ZX_PHP_convert_keywords_to_uppercase_v01.php

Feb 22nd, 2022 (edited)
522
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.12 KB | None | 0 0
  1. //+++++++++++++++++++++++++++function convert_to_upper+++++++++++++++++++++++++++++++++
  2. function convert_to_upper($query){
  3.     //Converts BASIC keywords to Uppercase BEFORE they are being fed to the bas2tap converter
  4.     echo "<h2>HELLO convert_to_upper</h2>";
  5. /* add this AFTER $mytext=$_REQUEST["text_entered"] ;
  6. if ($replace_with_capital) $mytext=convert_to_upper($mytext);
  7. */
  8.  
  9. $initial=    array (
  10. "copy", "return", "clear", "draw", "cls", "if", "randomize", "randomise", "save", "run", "plot", "print", "poke", "next", "pause", "let", "list", "load", "input", "go sub", "gosub", "go to", "goto", "for", "rem", "dim", "continue", "border", "new", "restore", "data", "read", "stop", "llist", "lprint", "out", "over", "inverse", "bright", "flash", "paper", "ink", "circle", "beep", "verify", "merge", "erase", "move", "format", "cat", "def fn", "deffn", "step", "to", "then", "line", "and", "or", "bin", "not", "chr$", "str$", "usr", "in", "peek", "abs", "sgn", "sqr", "int", "exp", "ln", "atn", "acs", "asn", "tan", "cos", "sin", "len", "val", "code", "val$", "tab", "at", "attr", "screen$", "point", "fn", "pi", "inkey$", "rnd"
  11.                                   );
  12.  
  13. $replacements=                            array (
  14. "COPY", "RETURN", "CLEAR", "DRAW", "CLS", "IF", "RANDOMIZE", "RANDOMIZE", "SAVE", "RUN", "PLOT", "PRINT", "POKE", "NEXT", "PAUSE", "LET", "LIST", "LOAD", "INPUT", "GO SUB", "GOSUB", "GO TO", "GOTO", "FOR", "REM", "DIM", "CONTINUE", "BORDER", "NEW", "RESTORE", "DATA", "READ", "STOP", "LLIST", "LPRINT", "OUT", "OVER", "INVERSE", "BRIGHT", "FLASH", "PAPER", "INK", "CIRCLE", "BEEP", "VERIFY", "MERGE", "ERASE", "MOVE", "FORMAT", "CAT", "DEF FN", "DEFFN", "STEP", "TO", "THEN", "LINE", "AND", "OR", "BIN", "NOT", "CHR$", "STR$", "USR", "IN", "PEEK", "ABS", "SGN", "SQR", "INT", "EXP", "LN", "ATN", "ACS", "ASN", "TAN", "COS", "SIN", "LEN", "VAL", "CODE", "VAL$", "TAB", "AT", "ATTR", "SCREEN$", "POINT", "FN", "PI", "INKEY$", "RND"
  15.                                   );
  16.  
  17.  
  18. $query = str_ireplace(     $initial   ,$replacements,  $query  );  
  19. return $query;
  20. }
  21. //--------------------------------function convert_to_upper------------------------------
Add Comment
Please, Sign In to add comment