File: runme.php4

package info (click to toggle)
cableswig 0.1.0%2Bcvs20060311-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 16,044 kB
  • ctags: 10,703
  • sloc: cpp: 33,966; ansic: 32,676; yacc: 3,999; makefile: 3,822; python: 2,387; ruby: 2,063; lisp: 1,841; java: 1,817; tcl: 1,097; php: 908; ml: 804; perl: 686; cs: 206; sh: 161
file content (71 lines) | stat: -rw-r--r-- 1,637 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?php

	require "example.php";
	/* Try to set the values of some global variables */

	ivar_set(42);
	svar_set(-31000);
	lvar_set(65537);
	uivar_set(123456);
	usvar_set(61000);
	ulvar_set(654321);
	scvar_set(-13);
	ucvar_set(251);
	cvar_set("S");
	fvar_set(3.14159);
	dvar_set(2.1828);
	strvar_set("Hello World");
	cstrvar_set("Goodbye");
	iptrvar_set(new_int(37));
	ptptr_set(new_point(37,42));
	name_set("Bill");

	echo "Variables (values printed from PHP)\n";

	echo "ivar	= ".ivar_get()."\n";
	echo "svar	= ".svar_get()."\n";
	echo "lvar	= ".lvar_get()."\n";
	echo "uivar	= ".uivar_get()."\n";
	echo "usvar	= ".usvar_get()."\n";
	echo "ulvar	= ".ulvar_get()."\n";
	echo "scvar	= ".scvar_get()."\n";
	echo "ucvar	= ".ucvar_get()."\n";
	echo "cvar	= ".cvar_get()."\n";
	echo "fvar	= ".fvar_get()."\n";
	echo "dvar	= ".dvar_get()."\n";
	echo "strvar	= ".strvar_get()."\n";
	echo "cstrvar	= ".cstrvar_get()."\n";
	echo "iptrvar	= ".iptrvar_get()."\n";
	echo "name	= ".name_get()."\n";
	echo "ptptr	= ".ptptr_get() , point_print(ptptr_get()) , "\n";
	echo "pt	= ".pt_get(), point_print(pt_get()) , "\n";

	echo "\nVariables (values printed from C)\n";

	print_vars();

	echo "\nI'm going to try and update a structure variable.\n";

	pt_set(ptptr_get());

	echo "The new value is \n";

	pt_print();

	echo "You should see the value", point_print(ptptr_get()), "\n";

	echo "\nNow I'm going to try and modify some read only variables\n";

	echo "Trying to set 'path'\n";

	//path_set("Whoa!");
	echo "Path = ".path_get()."\n";

	echo "Trying to set 'status'\n";

	/* And this */
	//status_set(0);
	echo "Status = ".status_get()."\n";

?>