本文整理汇总了C++中var::converter方法的典型用法代码示例。如果您正苦于以下问题:C++ var::converter方法的具体用法?C++ var::converter怎么用?C++ var::converter使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类var
的用法示例。
在下文中一共展示了var::converter方法的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 mode, in subject0, in body0, in groupids0, in jobids0, in userids0, in options, io emaillog) {
//options
//R = [email protected] email address if exists
//W = Groups by Word eg user with dept MEDIA BUYING matches group MEDIA
var interactive = not SYSTEM.a(33);
if (false) print(jobids0);//evade compiler warning on unused argument
if (mode.field(" ", 1) eq "UPGRADE") {
var subject = "NEOSYS Upgrade: " ^ SYSTEM.a(23);
if (SYSTEM.a(17) ne SYSTEM.a(23)) {
subject ^= " (" ^ SYSTEM.a(17) ^ ")";
}
var version = mode.field(" ", 2);
subject ^= version;
var body = "";
body ^= "The NEOSYS system software has been upgraded.";
body ^= VM;
body ^= VM ^ "Before you login to NEOSYS, please follow the instructions at";
body ^= VM ^ "http://userwiki.neosys.com/index.php/cache to avoid errors using NEOSYS.";
body ^= VM;
body ^= VM ^ "Please email [email protected] for any assistance.";
//body:=vm
//body:=vm:'This is an automated email. You cannot reply to it.'
body.converter(VM, var().chr(13));
call emailusers(mode, subject, body, "", "", "", "R", emaillog);
if (not emaillog) {
emaillog = "(nobody)";
}
emaillog = "Upgrade Notification emailed to:" ^ VM ^ emaillog;
emaillog.swapper(VM, var().chr(13));
call sysmsg(emaillog, "Upgrade to version " ^ version);
return 0;
} else if (mode ne "") {
var msg = DQ ^ (mode ^ DQ) ^ " is invalid in EMAILUSERS";
if (interactive) {
call mssg(msg);
}else{
call sysmsg(msg);
}
return 1;
}
//init:
//if target and options='' or index(options,'U',1) then
// end
var groupword = options.index("W", 1);
nsent = 0;
var subject = subject0;
var body = body0;
//read fromuser from users,@username else fromuser=''
var replyto = "";
if (options.index("R", 1)) {
if (USERNAME == "NEOSYS" or USERNAME == "ADAGENCY" or USERNAME == "ACCOUNTS") {
replyto = "[email protected]";
}else{
var fromuser = USERNAME.xlate("USERS", "", "X");
replyto = fromuser.a(7);
var fromline = "From " ^ fromuser.a(1);
if (USERNAME ne fromuser.a(1)) {
fromline ^= " (" ^ USERNAME ^ ")";
}
subject.splicer(1, 0, fromline ^ " : ");
}
}
var usercodes = SECURITY.a(1);
var nusers = usercodes.count(VM) + 1;
var usern = 0;
emaillog = "";
var alreadyemailed = "";
body.converter(FM ^ VM, var().chr(13) ^ var().chr(13));
var groupids = groupids0;
groupids.converter(",", VM);
var ngroups = groupids.count(VM) + 1;
var userids = userids0;
userids.converter(",", VM);
toemails = "";
ccemails = "";
var currdept = "";
var users;
if (not(users.open("USERS", ""))) {
call fsmsg();
//.........这里部分代码省略.........