Advertisement
Guest User

Untitled

a guest
Jan 20th, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.53 KB | None | 0 0
  1. main:
  2. ask 'sup: ' # (action)
  3. show it # (action)
  4. it`s 'hi' # (assertion)
  5. x = it or 'bye' # (assignment (conditional))
  6. again # (action (last))
  7.  
  8. ^[main]->x # call main as a protected function, save it to x
  9.  
  10. # it is a keyword which is a pointer to last thing referenced
  11. # x = 5
  12. # it is 5 (true)
  13. # it isnt 5 (false)
  14. # it`s 5 (true)
  15. # isn`t 5 (false)
  16. # it`s 5, ^do_when_true or ^something_else
  17.  
  18. # show is the default action?
  19.  
  20. # opposite of it`s is isn`t
  21. # ` is used to make the call more intended
  22.  
  23. # benefit of assertion is that it's always the last assertion
  24. # this means instead of needing to wrap an entire thing inside an if
  25. # you can use the ternary until you make a new assertion
  26. # if you do want to get a form of wrapping, you should make function calls
  27. # instead, inside the ternary
  28.  
  29. # allow for ^ask_show = main[1], it`s \d+
  30. # ask_show:
  31. # ask 'sup: ', it`s \d+ ^
  32.  
  33. # allow preventing of auto assignment to it
  34. # as line]
  35. # bracket on inside to represent inside protection
  36. # allow preventing of line pulling
  37. # as [line
  38. # bracket on outside to represent outside protection
  39. #
  40. # do both as [line]
  41. #
  42. # or whole function as [function]:
  43.  
  44. # @10, ^main # for it = each of 10, ^main
  45. # ^main, @it, ^it, @it, ^x
  46.  
  47. # another benefit of it is that you don't need to pass variables to functions
  48. # you can instead create what you want and then access it at the top
  49.  
  50. # allow for inline c++
  51. # c++:
  52. # custom:
  53. # #include <thing>
  54. # std::string x;
  55. # ...
  56. # ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement