本文整理汇总了C++中var::a方法的典型用法代码示例。如果您正苦于以下问题:C++ var::a方法的具体用法?C++ var::a怎么用?C++ var::a使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类var
的用法示例。
在下文中一共展示了var::a方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getupgradedates
subroutine getupgradedates() {
call osread(upgradelog, "UPGRADE.CFG");
upgradelog = upgradelog.field(0x1A, 1).trim();
upgradelog.converter("\r\n", FM);
var nn = upgradelog.count(FM) + (upgradelog ne "");
var upgradedata = "";
for (var ii = 1; ii <= nn; ++ii) {
var idate = (upgradelog.a(ii, 1).field(" ", 2, 3)).iconv("D");
//itime=iconv(field(upgradelog,' ',1),'MT')
if (not(upgradedata.locate(idate, xx))) {
upgradedata.r(-1, idate);
}
};//ii;
USER1 = upgradedata;
return;
}
示例2: main
function main(in mode, in select, in nfilters, dim& filters) {
if (false && mode && select && nfilters && filters(0,0)){};
var filename = SENTENCE.field(" ", 2);
var file;
if (not(file.open(filename))) {
return fsmsg();
}
var sentencex = SENTENCE;
sentencex.converter(" ", VM);
if (sentencex.locate("SELECT", temp, 1)) {
selectx = SENTENCE.field(" ", temp + 1, 9999);
sentencex = SENTENCE.field(" ", 1, temp - 1);
}else{
sentencex = SENTENCE;
selectx = "";
}
var normalise = sentencex.index(" NORMALISE", 1);
if (normalise) {
sentencex.swapper(" NORMALISE", "");
}
var raw = sentencex.index(" RAW", 1);
if (raw) {
sentencex.swapper(" RAW", "");
}
var mvgroupno = "";
var colheaderrow = not sentencex.index(" NOCOLHEADER", 1);
if (not colheaderrow) {
sentencex.swapper(" NOCOLHEADER", "");
}
if (filename.substr(1,4) == "DICT") {
tt = "VOC";
}else{
tt = filename;
}
if (not(DICT.open("dict_"^tt))) {
return fsmsg();
}
// var converter = "";
// if (not((tt!!!).read(DEFINITIONS, "CONVERTER*" ^ filename))) {
// tt!!! = "";
// }
// if (tt!!!.a(1)) {
// converter = "CONVERTER." ^ tt!!!.a(1);
// }
var xx;
if (xx.read(DICT, "AUTHORISED")) {
dicthasauthorised = 1;
}else{
dicthasauthorised = 0;
}
var notexportable = "";
var exportable = sentencex.field(" ", 3, 9999);
if (exportable) {
exportable.converter(" ", FM);
if (exportable.a(1) == "EXCEPT") {
notexportable = exportable.field(FM, 2, 9999);
exportable = "";
}
}
//expand any group fields in notexportable
if (notexportable) {
for (var ii = 1; ii <= notexportable.count(FM) + 1; ++ii) {
var dictrec;
if (dictrec.read(DICT, notexportable.a(ii))) {
if (dictrec.a(1) == "G") {
temp = dictrec.a(3);
temp.converter(VM ^ " ", FM ^ FM);
notexportable.r(ii, temp);
}
}
};//ii;
}
var listkey = var(1000000).rnd();
if (not exportable) {
if (exportable.read(DICT, "exportable")) {
if (exportable.a(1) == "G") {
exportable = exportable.a(3);
exportable.converter(VM ^ " ", FM ^ FM);
}
keyx = exportable.substr(1,exportable.index(FM ^ FM, 1) - 1);
nkeys = keyx.count(FM) + 1;
if (nkeys > 2) {
//call msg('Key field(s) should be followed by a blank line or space in EXPORTABLE')
//stop
nkeys = 0;
}
//.........这里部分代码省略.........
示例3: main
function main(in mode0) {
//WHATSNEW returns in ANS
ANS="";
var mode=mode0;
var keywords = "MEDIA" _VM_ "JOBS" _VM_ "FINANCE" _VM_ "TIMESHEETS" _VM_ "TECHNICAL" _VM_ "USER INTERFACE";
var nkeywords = keywords.count(VM) + 1;
if (not(openfile("CHANGELOG", changelog))) {
call fsmsg();
return 0;
}
if (not(openfile("DICT_CHANGELOG", DICT))) {
call fsmsg();
return 0;
}
if (mode.a(1) == "SELECTANDLIST") {
//call changelog.subs('SELECT':fm:data)
gosub select0(mode);
if (not LISTACTIVE) {
call mssg("Error: No records found");
return 0;
}
//call changelog.subs('LIST':fm:data)
gosub list(mode);
//returns outputfilename in ANS
} else if (mode.a(1) == "WHATSNEW") {
var menucodes = mode.a(2);
mode = mode.a(1);
ANS = "";
var users;
if (not(users.open("USERS", ""))) {
return 0;
}
var userrec;
if (userrec.read(users, USERNAME)) {
//backward compatible ... can be deleted after all upgraded
//leave in case reloading ancient data
if (not userrec.a(17)) {
var changelogkey = "USER*" ^ USERNAME;
if (changelog.read(DEFINITIONS, changelogkey)) {
userrec.r(17, changelog.a(8));
(userrec.a(17)).writev(users, USERNAME, 17);
var("").writev(DEFINITIONS, changelogkey, 8);
}
}
//mode<2>=changelog<7>
mode.r(3, userrec.a(17));
//fix a problem where people were missing most changes
//due to sv being represented as : eg user:support:technical
if (mode.a(3) and mode.a(3) < 14773) {
mode.r(3, 14153);
}
}else{
//show everything the first time they logon
//mode<3>=iconv('1/1/2004','D/E')
//show nothing the very first time they logon
ANS = "";
return 0;
}
//get last upgradedate
var temp = var(".\\GENERAL\\VERSION.DAT").xlate("DOS", 1, "X");
var lastupgradedatetime = (temp.trim().field(" ", 2, 999)).iconv("D");
lastupgradedatetime ^= "." ^ ((temp.trim().field(" ", 1)).iconv("MT")).oconv("R(0)#5");
//nothing to see if seen after lastupgradedate
if (mode.a(3) >= lastupgradedatetime) {
ANS = "";
return 0;
}
lastupgradedatetime.writev(users, USERNAME, 17);
//build preferences from menus if not specified
if (not mode.a(2)) {
//tt=capitalise(menucodes)
//swap 'Support' with 'Technical' in tt
//mode<2>=tt
if (menucodes.index("FINANCE", 1)) {
mode.r(2, -1, "Finance");
//.........这里部分代码省略.........