main.m
来自「仿真人工金融市场Jackson代码」· M 代码 · 共 30 行
M
30 行
#import <simtools.h>#import "ObserverSwarm.h"// #import "BatchSwarm.h"int main(int argc, const char ** argv) { id theTopLevelSwarm ; // Swarm initialization: all Swarm apps must call this first. initSwarm(argc, argv); // swarmGUIMode is set in initSwarm(). It's set to be 1 if you // typed -batchmode. Otherwise, it's set to 0. // if (swarmGUIMode == 1) // We've got graphics, so make a full ObserverSwarm to get GUI objects theTopLevelSwarm = [ObserverSwarm create: globalZone]; // else // No graphics - make a batchmode swarm and run it. // theTopLevelSwarm = [BatchSwarm create: globalZone]; [theTopLevelSwarm buildObjects]; [theTopLevelSwarm buildActions]; [theTopLevelSwarm activateIn: nil]; [theTopLevelSwarm go]; // theTopLevelSwarm has finished processing, so it's time to quit. return 0;}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?