How do you define print? | Sololearn: Learn to code for FREE!


How do you define print?

Print in most languages is what appears to be a predefined function, but without the pre-existing ability to to post stuff on the command line, how do you define a function that can do so? I would guess there is some kind of API to interface with for it,but its not the sort of thing that you ever see done.

1/2/2022 1:24:39 PM


2 Answers

New Answer


I would guess its something you have to define in the early stages of building a language, and there you show it how by referring the print command to another language or assembly code that knows how to do it already,and you bake that into your compiler/interpreter, does anyone have any further useful info on this? As I would be very interested, currently learning how to build languages.