Overview
Comment: | Implement the conditional blocks in (PopUp) texts. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
88913b5804337fab00ef32e01a4d883c |
User & Date: | user on 2022-08-31 23:24:10 |
Other Links: | manifest | tags |
Context
2022-09-01
| ||
21:59 | Enhancements to (PopUp) to use arrays; new Quiz and ,Quiz commands to set quiz_obj; bug fix for the case where quiz_obj has been destroyed. check-in: cb281b5818 user: user tags: trunk | |
2022-08-31
| ||
23:24 | Implement the conditional blocks in (PopUp) texts. check-in: 88913b5804 user: user tags: trunk | |
2022-08-30
| ||
22:12 | Add a "S" column to the "GRAPH" SQL table in the picture editor. The example ALT+M macro uses this to automatically apply horizontal mirror symmetry to a picture. check-in: bb9043ee13 user: user tags: trunk | |
Changes
Modified class.doc from [6ae95e1473] to [fcbb96f739].
︙ | ︙ | |||
2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 | %X Display a unsigned hexadecimal number in uppercase. %% Display a percentage sign; does not consume an argument. === Messages === This section describes when the various standard messages are sent to objects, and what return values are expected. (Do not confuse CREATE with CREATED, or DESTROY with DESTROYED, or COLLIDE with COLLIDING; they have different purposes.) | > > > > > > > > > > > > > > > > > > | 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 | %X Display a unsigned hexadecimal number in uppercase. %% Display a percentage sign; does not consume an argument. %( Begin a conditional block, of the form "%(true-part%|false-part%)" or "%(true-part%)". Consumes one argument; if zero then the false-part is used (or nothing, if there is no false-part), or if nonzero then the true-part is used. Conditional blocks cannot be nested. %| Else part of a conditional block. See above about conditional blocks. %) End of a conditional block. See above about conditional blocks. %< Unconsume one argument. (Does not produce any output.) %> Skip one argument. (Does not produce any output.) === Messages === This section describes when the various standard messages are sent to objects, and what return values are expected. (Do not confuse CREATE with CREATED, or DESTROY with DESTROYED, or COLLIDE with COLLIDING; they have different purposes.) |
︙ | ︙ |
Modified exec.c from [c46e9ed216] to [39d6976b93].
︙ | ︙ | |||
2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 | if(argi==argc) break; v=vstack[vstackptr+argi++]; if(v.t==TY_NUMBER) sqlite3_str_appendf(s,"%X",(unsigned int)v.u); break; case '%': sqlite3_str_appendchar(s,1,'%'); break; } } else { sqlite3_str_appendall(s,t); break; } } sqlite3_str_appendchar(s,1,0); | > > > > > > > > > > > > > > > > > > > > > > > | 2074 2075 2076 2077 2078 2079 2080 2081 2082 2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 | if(argi==argc) break; v=vstack[vstackptr+argi++]; if(v.t==TY_NUMBER) sqlite3_str_appendf(s,"%X",(unsigned int)v.u); break; case '%': sqlite3_str_appendchar(s,1,'%'); break; case '(': if(argi==argc) break; v=vstack[vstackptr+argi++]; if(v.t || v.u) break; // otherwise fall through case '|': while(u=strchr(t,'%')) { t=u+(u[1]?2:1); if(u[1]==')' || u[1]=='|') break; } break; case ')': // no effect break; case '<': if(argi>0) --argi; break; case '>': if(argi<argc) ++argi; break; default: if(main_options['t'] || main_options['v']) fprintf(stderr,"Unrecognized %% code in (PopUp)\n"); break; } } else { sqlite3_str_appendall(s,t); break; } } sqlite3_str_appendchar(s,1,0); |
︙ | ︙ |