Talk:Compiler/syntax analyzer: Difference between revisions
Content added Content deleted
(→Prtc node type documentation ambiguity: new section) |
m (Respond to a question) |
||
Line 36: | Line 36: | ||
I hope it's acceptable to instead use a 'Putc' node type for the putc operation. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 01:20, 21 January 2022 (UTC) |
I hope it's acceptable to instead use a 'Putc' node type for the putc operation. --[[User:Rdm|Rdm]] ([[User talk:Rdm|talk]]) 01:20, 21 January 2022 (UTC) |
||
The three printing nodes types are: |
|||
*Prtc -- prints a character |
|||
*Prts -- prints a string |
|||
*Prti -- prints an integer |
|||
I used putc() for printing characters, because that is what C using. |
|||
For a Rosetta code task, adding printf() would have been too big, and puts() (from C) adds a newline, which I did not want. |
|||
So, I settled on putc() and print(). |
|||
Of course, you are free to implement however you like, but it make not work with other implementations, e.g., you can intermix the C and Pything modules, because they use the same external names. |
|||
--[[User:Ed Davis|Ed Davis]] ([[User talk:Ed Davis|talk]]) 17:55, 21 January 2021 (UTC) |