Advertisement
plirof2

ZX BASIC - Replace While, Repeat htm2tap, replace BEFORE submit JS

Dec 3rd, 2022 (edited)
1,383
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ZX Spectrum BASIC
  2. REPEAT UNTIL:
  3. 325 REPEAT j
  4. 330   INPUT "ENTER NUMBER: ";N
  5. 335   IF N="10" THEN PRINT "Congrats":LET j=1
  6. 345 UNTIL j=1
  7.  
  8. REPEAT Translates to :
  9. 325 FOR j = 0 TO 1 STEP 0 : REM REPEAT
  10. 330   INPUT "ENTER NUMBER: ";N
  11. 335   IF N="10" THEN PRINT "Congrats":LET j=1
  12. 345 NEXT j : REM UNTIL
  13. ___________________________________________
  14. WHILE UNTIL:
  15. 325 While j < 1
  16. 330   INPUT "ENTER NUMBER: ";N
  17. 335   IF N="10" THEN PRINT "Congrats":LET j=1
  18. 345 EndWhile
  19.  
  20. WHILE Translates to :
  21. 325 FOR i = NOT( j < 1 ) TO 0.5 STEP 0 : REM While
  22. 330 INPUT "ENTER NUMBER: ";N
  23. 335 IF N="10" THEN PRINT "Congrats":LET j=1
  24. 340 LET i = NOT ( j<1 )
  25. 345 NEXT i : REM ENDWhile
  26.  
  27.  
  28.  
  29. _________________
  30. Javascript replace BEFORE submit
  31. https://stackoverflow.com/questions/4517366/change-form-values-after-submit-button-pressed
  32.  
  33. window.onload = function() {
  34.  
  35.   document.getElementById('theForm').onsubmit = function() {
  36.     var txt = document.getElementById('txtSearch');
  37.     txt.value = "updated " + txt.value;
  38.   };
  39. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement