root/NEWT0/trunk/documents/01_howto.txt

Revision 42, 7.6 kB (checked in by gnue, 3 years ago)

added Getch global function

Line 
1���I�Ȏg����-----------   ��ɐ����܂��񂪁AUNIX �̊����[���i��s�p�X���j���킩��Ă����̂Ƃ��܂��B   �����I�Ȏg����  �܂���UNIX �R�}���h�̂��񑩁A-h �I�v�V������Usage ��     ������       % newt -h       Usage: newt [switches] [--] [programfile]         -t              enable trace mode           �c  �g���[�X���[�h�Ŏ�s���܂�         -l              dump lex info               �c  �����͎��̏��\��         -s              dump syntax tree            �c  �\���؂��         -b              dump byte code              �c  �o�C�g�R�[�h���         -C directory    change working directory    �c  ���f�B���N�g���̕ύX         -e 'command'    one line of script          �c  ���X�N���v�g��s         -i [symbols]    print function info         �c  �g���݊֐��̐����                                                         ���Ȃ����S�֐����         -v              print version number        �c  �o�[�W�������         -h              print this help message     �c  ���̃��b�Z�[�W���         --copyright     print copyright             �c  �R�s�[���C�g���         --version       print version number        �c  �o�[�W��������i-v �Ɠ����j     �X�N���v�g�̎�s�B�܁A���ʂ̃X�N���v�g�����قړ����ł��B       % newt �t�@�C����         �c  �X�N���v�g�t�@�C����s       % newt < �t�@�C����       �c  �W����������s       % �t�@�C����              �c  �X�N���v�g�t�@�C���̂P�s�ڂ� #!newt �̏ꍇ(*1)       *1) NewtonScript �̃R�����g��/* */ ��// �݂̂ł����AUNIX ��#! �������           �ɂ��邽�߂ɁA�t�@�C���̂P�����ڂ� # �̂Ƃ��݂̂��̍s�̓R�����g�Ƃ��Ĉ���         ����ʏ��u��Ă��܂�   ���g�������݊֐�       -i �I�v�V�����őg���݊֐��̈ꗗ���\���������B   % newt -i         HasVariable(frame, name)         HasVar(name)         DefGlobalFn(name, fn)         DefGlobalVar(name, value)         Mod(n1, n2)         RemoveSlot(obj, slot)         Throw(name, data)         Rethrow()         CurrentException()         PrimClassOf(obj)         TotalClone(obj)         HasSubclass(sub, super)         IsSubclass(sub, super)         IsInstance(obj, class)         IsArray(obj)         IsFrame(obj)         IsSymbol(obj)         IsString(obj)         IsCharacter(obj)         IsInteger(obj)         IsReal(obj)         IsNumber(obj)         IsImmediate(obj)         IsFunction(obj)         IsReadonly(obj)         Intern(str)         MakeBinary(length, class)         SetLength(obj, len)         HasSlot(frame, slot)         GetSlot(frame, slot)         SetSlot(frame, slot, v)         GetVariable(frame, slot)         SetVariable(frame, slot, v)         GetRoot()         GetGlobals()         GC()         Compile(str)         GetGlobalFn(symbol)         GetGlobalVar(symbol)         GlobalFnExists(symbol)         GlobalVarExists(symbol)         UndefGlobalFn(symbol)         UndefGlobalVar(symbol)         Chr(integer)         Ord(char)         StrLen(str)         SubStr(str, start, count)         StrEqual(a, b)         StrExactCompare(a, b)         StrCat(str1, str2)                      �c  �������������������(*2)         SPrintObject(obj)         SymbolCompareLex(symbol1, symbol2)         P(obj)                                  �c  �I�u�W�F�N�g����`�Ńv�����g�B������Print �֐��ɑ���         Print(obj)                              �c  �I�u�W�F�N�g������g�B�O�� " �͏o�͂�������)         ParamStr(baseString, paramStrArray)         LoadLib(file)                           �c  �O�����C�u������[�h(*2)         Load(file)                              �c  �X�N���v�g�t�@�C����[�h���Ď�s(*2)         Require(str)                            �c  ���C�u�������(*2)         GetEnv(str)                             �c  �‹��ϐ����(*2)         FileExists(path)                        �c  �t�@�C���̑��݊m�F(*2)         DirName(path)                           �c  �p�X�����B���N�g������o��(*2)         BaseName(path)                          �c  �p�X�����@�C������o��(*2)         JoinPath(dir, fname)                    �c  �f�B���N�g�����ƃt�@�C���������X�𐶐�(*2)         ExpandPath(path)                        �c  ���΃p�X��΃p�X�ɓW�J����2)         Split(str, sep)                         �c  ��������蕶���ŕ������Ĕz�����(*2)         DumpFn(fn)                              �c  �֐�����v�\��(*3)                                                     �� nil �̏ꍇ�͌��ݎ�s���̊֐�����v�\��         DumpBC(instructions)                    �c  �o�C�g�R�[�h�i�o�C�i���j����v�\��(*3)         DumpStacks()                            �c  VM �X�^�b�N����v�\��(*3)         Gets()                                  �c  �W������s���̕�����擾         Getc()                                  �c  �W������������         Getch()                                 �c  �L�[�{�[�h�����͕���������擾         And(n1, n2)                             �c  (*4)         Or(n1, n2)                              �c  (*4)         ShiftLeft(n1, n2)                       �c  (*4)         ShiftRight(n1, n2)                      �c  (*4)         ObjectEqual(obj1, obj2)                 �c  (*4)         DefMagicPointer(mp, value)              �c  (*4)         MakeRegex(pattern, opt)                 �c  (*4)         Clone(obj)                              �c  (*5)         ClassOf(obj)                            �c  (*5)         Length(obj)                             �c  (*5)       *2) �Ǝ��g���̊֐�       *3) �f�o�b�O�p�̊֐�       *4) �\���i�I�y���[�^���j���玩���I�ɓW�J�����֐�       *5) �o�C�g�R�[�h�ɕϊ������֐��Anewt -i �ł͕\����������     ���̊֐��̑��ɂ̓I�y���[�^�i���Z�q�j���g���܂��B       �����Ă̒ʂ����������삳���邽�߂ɍŒ��K�v�Ȋ֐��݂̂ŁA�g��         �������قƂ��������ewtonScript �̌����j���A���̒�����       �g���݊֐��Ƃ��ĕK�v�Ȋ֐���X�g�A�b�v�����v��������   ���O�����C�u�����ɂ‚���     �b�����쐬�����O�����C�u�������g�������ɂȂ�Ă��܂��B       LoadLib("samplelib.dylib");       �����p�X�����͑��΃p�X�Ńt�@�C������肵�ĉ�����     �ŃT���v���̊O�����C�u���������[�h�������̂Q�‚̊֐����lj�    �������B        GetGlobalFn(name)            �c  �O���[�o���֐��̊֐��I�u�W�F�N�g���        info(obj)                    �c  �֐��I�u�W�F�N�g�����̓V���{���Ŏw�肳�ꂽ                                         �O���[�o���֐��̐����   ��Require �ɂ����C�u�����v���ɂ‚���     Require �ɂ��O�����C�u����(�g���q .dylib, .so�j�܂���    �\�[�X�R�[�h�i�g���q .newt�j��񂾂����[�h���邱�Ƃ��ł��܂��B     �����[�h���ꂽ���C�u�����̓��[�h����������C�u��������X     �ɂ����[�h���郉�C�u��������܂��B        Require("protoFILE");   �����C�u��������X�ɂ‚���     ���C�u�����͊‹��ϐ� NEWTLIB �ɐݒ肳�ꂽ����X�ɂ�     ��������BNEWTLIB  ���ݒ肳�����Ȃ��ꍇ�̓J�����g�p�X     ������s�t�@�C���̂����B���N�g�����猟������B   �������C�u�����ɂ‚���     egg.newt �����C�u��������X�ɑ��݂������Anewt ���N     �����ꂽ�Ƃ��Ɏ����I�ɓǍ��܂����B   ���O���[�o���ϐ�         _EXEDIR_                                �c  ��s�t�@�C���̂����B���N�g��         _ARGV_                                  �c  �R�}���h���N�����ꂽ�Ƃ��̈��R�}���h���͓���j         _ENV_                                   �c  �‹��ϐ��i���݂�NEWTLIB �̂݁j���i�[�������Ƃ�����       _VERSION_                               �c  �o�[�W������         _STDOUT_                                �c  �W���o�́i�ʏ� NIL�A������ꍇ���̕�����o�͂��lj�����j         _STDERR_                                �c  �W���G���[�o�́i�ʏ� NIL�A������ꍇ���̕�����o�͂��lj�����j         requires                                �c  Require ���ꂽ���C�u�����̏�   �������ύX�������Ƃ����邩��������
Note: See TracBrowser for help on using the browser.