v8学习---Hello world
来源:互联网 发布:舞梦成真软件 编辑:程序博客网 时间:2024/05/01 05:43
基本上完全抄自v8文档
#include <v8.h>using namespace v8;int main(int argc, char* argv[]) { // Get the default Isolate created at startup. Isolate* isolate = Isolate::GetCurrent(); // Create a stack-allocated handle scope. HandleScope handle_scope(isolate); // Create a new context. Handle<Context> context = Context::New(isolate); // Enter the created context for compiling and // running the hello world script. Context::Scope context_scope(context); // Create a string containing the JavaScript source code. Handle<String> source = String::New("'Hello' + ', World!'"); // Compile the source code. Handle<Script> script = Script::Compile(source); // Run the script to get the result. Handle<Value> result = script->Run(); // Convert the result to an ASCII string and print it. String::AsciiValue ascii(result); printf("%s\n", *ascii); return 0;}
- v8学习---Hello world
- Getting Started(v8 hello world)
- Shader学习 Hello World!
- maven学习 ----hello-world
- 学习scala-hello-world!
- Android学习--Hello World
- 驱动学习-hello world
- springMVC学习(hello world)
- Fortran 学习Hello World
- Hello World学习笔记
- ionic学习--hello world
- Java学习-Hello world
- 算法学习 -- hello world
- 学习scala: Hello World
- java学习--hello world
- V8 JavaScript Engine 入门指南 2 -- Hello World
- V8 学习手册(一)—— hello V8
- java 反射学习(hello world)
- js 学习笔记---BOM
- 珍惜太难,遗忘太易?
- java匿名内部类
- 开源
- hibernate解决传入oracle数据库没有时分秒问题
- v8学习---Hello world
- HTTP的通信机制
- C++之inline
- oracle 12c EM Express 的补充
- evernote的标签管理有问题
- Java中的final关键字
- (2)数据类型和运算符
- spring如何在xml里配置Calendar,Date
- linux中时间命令date