Skip to content

Commit

Permalink
Add U to push a newline
Browse files Browse the repository at this point in the history
  • Loading branch information
refi64 committed Nov 20, 2015
1 parent 9d08901 commit 39e4e76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In the format `HEX (char): use`. Things in bold need to be checked in the interp
* _52_ (`R`):
* _53_ (`S`): Blank String
* _54_ (`T`): String with space `" "`
* _55_ (`U`):
* _55_ (`U`): Newline string `"\n"`
* _56_ (`V`): _Commonly used for variables_
* _57_ (`W`): Push 32
* _58_ (`X`): Push 33
Expand Down
3 changes: 3 additions & 0 deletions o.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ S exc(C c){
case '~':eval(st);BK; //eval
case 'S':psh(st,newos("",0));BK; //blank string
case 'T':psh(st,newos(" ",1));BK; //string w/ space
case 'U':psh(st,newos("\n",1));BK; //string w/ newline
case '\'':pc=1;BK; //begin char
case '"':ps=1;psb=alc(1);BK; //begin string
case '{':pcb=1;pcbb=alc(1);cbi++;BK; //being codeblock
Expand Down Expand Up @@ -409,6 +410,8 @@ T(sop){TI //test string ops(I really hate the need to escape all the quotes here
TX("\"ab\\tc\\nd\"",S,"ab\tc\nd")
TX("\"\\\"\"",S,"\"")
TX("S",S,"")
TX("T",S," ")
TX("U",S,"\n")
TX("G\"abc\"+",S,"abcdefghijklmnopqrstuvwxyzabc")
TX("\"abc\"G+",S,"abcabcdefghijklmnopqrstuvwxyz")
TX("\"\"\"\"+",S,"")
Expand Down

1 comment on commit 39e4e76

@phase
Copy link
Owner

@phase phase commented on 39e4e76 Nov 20, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oooo noice 👍

Please sign in to comment.