Welcome to UnderC version 1.2.9w
This package consists of the executable (UCW), a default script file,
this file, and the library files. It is important that the header files
end up in a 'include' subdirectory of the directory where UCW is found.
If you unzip this file using its path information ('use folder names') this will
automatically happen. You can optionally specify the UnderC directory
with the environment variable UC_HOME; note that this points to the directory
containing ucw.exe. If you do this, then you can copy the executable anywhere
and it will still be able to find the header files.
defs.h is the default script that is included when UC loads, and
contains the basic standard library includes (it's of course possible
to define and use another defs.h by working from another directory).
If it is not found in the current directory, then the version in the
UCW directory will be used.
Purists will notice 'using namespace std;' in defs.h and may delete it if it
makes them feel better. These headers make no pretense at implementing
the full standard library versions - the string and the iostream
classes are not templates, and should be seen as 'pocket' versions
for demonstrating the full power of these classes. The final
release versions will be more powerfull; in particular, I haven't
implemented any formating control of the ostream output.
When UC loads you will be presented with the ;> prompt. You can now
type a valid C++ statement, a preprocessor directive like #include, or
one of several extra interactive commands which all begin with '#'.
I have an IDE in development, which is an editor which communicates
with UCW and provides a menu-driven interface to these commands.
Command Summary
Quit Command: #q, #ql
Close session; #ql in addition writes a unique log file, with a
name based on the time and date.
Load Command: #l <file>
The most important of these is '#l file' which has the same effect
as '#include "file"', except that the system does some clean-ups if
that module has been previously loaded. It will remove any macros
that were defined in that source file, clean out typedefs, and
remove any injected namespaces. So even if the std namespace is
loaded in your interactive session (and this is the default) this
doesn't apply to any #l'd files.
*NB* You still have to say 'using namespace std' in any #l'd files,
if you want std injected into the global namespace. I am thinking
of changing this requirement.
After the first load, '#l' on its own will reload the last file.
Run Program: #r <file> <command-line arguments>
After a file containing a main() function is loaded, and successfully
compiled, #r will let you run that program with the supplied
arguments. The program is run in its own thread and console window,
so you can interactively evaluate variables etc while the program is
waiting for input.
Execute shell command: #x <cmd>
For example, #x dir /w
Load Library command: #lib <dll>
After this command, any prototype or class definition is assumed
to be a request for dynamically linking to the library.
There are also commands for setting breakpoints, etc, but these are
still experimental, and chiefly intended for use of the IDE.
Built-in Functions
The following library functions are already available:
sin, cos, exp, log, atof, atoi, rand
strcpy, strncpy, strcat, strcmp, strdup, strtok, strstr, strlen,memmove
puts,printf,sprintf,gets,fgets,fprintf,fscanf,fread,fwrite,feof,
fopen,fclose,fflush
You will find it necessary to put empty stdio.h, etc headers in the
include directory for compatibility with traditional systems.
Importing Functions and Classes
It is easy to import any extern "C" function from a DLL. For example,
all modern Linux systems have the runtime shared library, libc.so.6
To make isalpha() available, one can say:
;> #lib msvcrt40.dll
;> extern "C" int isalpha(char);
;> #lib
;>isalpha('*');
(int) 0
It is also possible to use '#pragma dlink' which has the same meaning as
'#lib' but is C++ compatible.
It is possible to import classes which have been compiled with
GCC 2.96 and 3.2 This is compiler-specific because generally
C++ export names are 'decorated' or 'mangled'.
This is still work in progress and obviously it still gets
confused. However, it is possible to inherit from an imported
class and override a virtual method, which is more than older systems
like CINT can do. I have managed to import VTK vs 1.0 (Visualization
Toolkit) which is a large class library for visualizing data in
three dimensions. This was about 200 classes, so the system can
definitely scale up. Currently I am working on importing YAWL
(Yet Another Windows Library) which is the GUI framework
which UC and the IDE use.
Features
UC implements a generous subset of the ISO standard, including
exception handling, namespaces, and templates. Obviously the more
advanced features are somewhat restricted, but will do fine for
educational purposes. UC compiles source into an intermediate
p-code, so as interpreters go it is pretty fast, but speed has not
been a concern yet. I think correctness, robustness and friendliness
are my main goals, and there has been good progress with the first two.
(The error messages are still a little non-obvious).
Limitations
Templates are implemented naively, as macro-like insertions of source,
rather than by building an abstract parse tree. One implication of
this is that UCW instantiates _all methods_, including those which
obviously don't appy to all possible parameter types. For example,
list<T>::remove() doesn't make sense unless objects of type T can be
compared. I've hacked UC so that not finding operator== in a
simple struct is not a problem.
Instantiation errors are currently not reported on the correct line.
There are still a few rough edges with the parsing, which as always
with C++ has been distinctly non-trivial.
I intend to have a consolidated list of known problems available
soon.
Portability
Currently UnderC runs on Linux and Windows, where there is both a console
and a graphical version. It should be easy to move across to any x86
system; the machine dependencies are all contained in directcall.cpp and
consist of a hundred lines of inline assembler.
An Example Transcript
UnderC Development Project, Vs 0.9.0w
Steve Donovan, 2001
;> // demonstrating std::string
;> string s = "hello dolly";
;> s.substr(0,5);
(string) 'hello'
;> s.substr(s.find("dolly"),5);
(string) 'dolly'
;> s += " you're so swell";
(string&) 'hello dolly you're so swell'
;> s.length();
(int) 27
;> // creating a list of strings...
;> list<string> ls;
instantiated: list<string>
;> ls.push_back(s);
;> ls.push_back("way back when");
;> ls.front();
(string&) 'hello dolly you're so swell'
;> ls.back();
(string&) 'way back when'
;> ls.push_front("singing...");
;> typedef list<string> LS;
;> LS::iterator li;
;> for(li=ls.begin();li!=ls.end();++li)
;> cout << *li << endl;
singing...
hello dolly you're so swell
way back when
;> // demonstrating vectors...
;> vector<int> vi;
instantiated: vector<int>
;> for(int i=0;i<10;i++)
;> vi.push_back(i);
;> vi[9];
(int&) 9
;> // a useful shortcut!
;> #define FORALL(i,c) \
;> for(i=c.begin();i!=c.end();++i)
;> vector<int>::iterator ii;
;> int sum = 0;
;> FORALL(ii,vi) sum += *ii;
;> sum;
(int) sum = 45
;> // typing in a function
;> int sqr(int i) { return i*i;}
;> sqr(10);
(int) 100
;> double sqr(double x) { return x*x; }
;> sqr(1.2);
(double) 1.44
;> // the function main is special
;> int main() {
;:1} int i,j;
;:1} cin >> i >> j;
;:1} cout << "i+j = " << i+j << endl;
;:1} }
;> #r
Steve Donovan,
sdonovan@mweb.co.za
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
Cheat+Engine V5.4 完整源代码 (1437个子文件)
algorithm 5KB
algorithm 5KB
algorithm 5KB
all-wcprops 32KB
all-wcprops 14KB
all-wcprops 14KB
all-wcprops 14KB
all-wcprops 13KB
all-wcprops 6KB
all-wcprops 6KB
all-wcprops 5KB
all-wcprops 4KB
all-wcprops 4KB
all-wcprops 4KB
all-wcprops 3KB
all-wcprops 3KB
all-wcprops 3KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 952B
all-wcprops 899B
all-wcprops 798B
all-wcprops 788B
all-wcprops 787B
all-wcprops 704B
all-wcprops 698B
all-wcprops 685B
all-wcprops 673B
all-wcprops 654B
all-wcprops 638B
all-wcprops 606B
all-wcprops 596B
all-wcprops 534B
all-wcprops 497B
all-wcprops 462B
all-wcprops 458B
all-wcprops 234B
all-wcprops 218B
all-wcprops 214B
all-wcprops 208B
all-wcprops 196B
all-wcprops 182B
all-wcprops 182B
all-wcprops 180B
all-wcprops 101B
all-wcprops 85B
all-wcprops 82B
XNAMES.AWK 297B
extract.awk 249B
compile.bat 1KB
betacopy.bat 816B
cetc.bat 183B
ce.bat 175B
bbison.bat 72B
b.bat 57B
settings.bin 5B
style3def.bmp 78KB
Standalonetype3a.bmp 10KB
LOGO3.BMP 9KB
logo2.bmp 8KB
LockedString.bmp 5KB
test.bmp 4KB
logo.bmp 4KB
UnLockedString.bmp 4KB
TextureString.bmp 3KB
image.bmp 2KB
cheat.bmp 1KB
text.bmp 1KB
cheatlist.bmp 1KB
process.bmp 1KB
button.bmp 1KB
open.bmp 726B
save.bmp 714B
pause.bmp 374B
colors.bmp 238B
movementtexture.bmp 190B
targettexture.bmp 190B
Locktexture.bmp 190B
tlg1.bmp 162B
exitmarker.bmp 138B
browse.bmp 138B
selection.bmp 138B
Up.bmp 118B
Down.bmp 118B
right.bmp 106B
nothing.bmp 66B
black.bmp 66B
BACK2.BMP 0B
cheatengine.bpg 934B
DBKDrvr.c 61KB
memscan.c 35KB
DBKFunc.c 27KB
cetc.c 19KB
tdiwrapper.c 16KB
rootkit.c 13KB
共 1437 条
- 1
- 2
- 3
- 4
- 5
- 6
- 15
资源评论
- suner20012017-05-05还没用,一会试试行不行
iiishe
- 粉丝: 19
- 资源: 32
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功