📄 readme.sqrt-server
字号:
There are three examples in this directory of "square root" servers.These are Glish clients that respond to particular events they receiveby generating "square-root" response events. The response event hasa value which is the square root of the value of the received event.The first example is a C++ program, "sqrt_server.cc". The comments in theprogram explain the various steps in writing a full C++ client, as well ashow to compile and link the client. The Glish program "sqrt_server.g" isused to test the client. This client is the most flexible of the threeexamples (and the most typical), but also the most complicated.The second example is what is called a "shell" client. Some Glish clientsare simple enough that they can be expressed as a program that reads textfrom stdin and writes text to stdout. This type of client is very simpleto write, but often rather inflexible - unable to deal with array valuesor to generate error messages. The example is found in "shell_sqrt.c",and the corresponding Glish program in "shell_sqrt.g".The final example demonstrates a "shell" client that is written using aUnix utility ("awk") rather than a C program. Thus there is no sourcecode, only a Glish program, "awk_sqrt.g". This type of client is thesimplest to write but is quite inflexible. In particular (as explainedin the comments in awk_sqrt.g) it does not generate any output eventsuntil its source of input events is closed.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -