📄 example.cc
字号:
// file: $isip/doc/examples/class/math/scalar/math_scalar_example_01/example.cc// version: $Id: example.cc,v 1.3 2000/12/17 18:17:48 hamaker Exp $//// isip include files//#include <Float.h>#include <Console.h>// main program starts here:// this program demonstrates a few simple functions of the scalar objects// and how the resultant objects change depending on the prototype of the// function called.//int main () { // declare the objects we will work with // Float x(3.0); Float y; Float z; // compute the factorial of x and assign it to y: // note that both y and x are now equal to 3! // y.assign(x.factorial()); // compute y cubed and assign it to z: // note that this time, we do not explicitly call the assign method. // the assignment is implicit in the method call. y is unchanged. // z.pow(y, 3.0); // output the values to the screen // x.debug(L"x=3!"); y.debug(L"y = x! = 3!"); z.debug(L"z = y**3 = (x!)**3 = (3!)**3"); // exit gracefully // Integral::exit();}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -