亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? sortd.src

?? 沒有說明
?? SRC
?? 第 1 頁 / 共 2 頁
字號:
/*
** sortd.src
** (C) Copyright 1988-1998 by Aptech Systems, Inc.
** All Rights Reserved.
**
** This Software Product is PROPRIETARY SOURCE CODE OF APTECH
** SYSTEMS, INC.    This File Header must accompany all files using
** any portion, in whole or in part, of this Source Code.   In
** addition, the right to create such files is strictly limited by
** Section 2.A. of the GAUSS Applications License Agreement
** accompanying this Software Product.
**
** If you wish to distribute any portion of the proprietary Source
** Code, in whole or in part, you must first obtain written
** permission from Aptech Systems.
**
**  Format                                                        Line
** =========================================================================
** INTRLEAV(infile1,infile2,outfile,keyvar,keytyp);                25
** MERGEBY(infile1,infile2,outfile,keytyp);                       337
** SORTD(infile,outfile,keyvar,keytyp);                           567
*/

/*
**> intrleav
**
**  Purpose:    To interleave the rows of two files that have been
**              sorted on a common variable, to give a single
**              file sorted on that variable.
**
**  Format:     intrleav(infile1,infile2,outfile,keyvar,keytyp);
**
**  Inputs:     infile1    string, name of input file 1.
**
**              infile2    string, name of input file 2.
**
**              outfile    string, name of output file.
**
**              keyvar     string, name of key variable, this is the column
**                         the files are sorted on.
**
**              keytyp     scalar, data type of key variable.
**
**                          1   numeric key, ascending order
**                          2   character key, ascending order
**                         -1   numeric key, descending order
**                         -2   character key, descending order
**
**  Remarks:    The two files MUST have exactly the same
**              variables, that is, the same number of columns
**              AND the same variable names. They must both
**              already be sorted on the key column. This
**              procedure will combine them into one large file,
**              sorted by the key variable.
**
**              If the inputs are null ("" or 0) the procedure
**              will ask for them.
**
**  Globals:    None
*/

proc 0 = intrleav(infile1,infile2,outfile,keyvar,keytyp);
    local ord,fstate,f1,f2,fout,inx,ws,b1,b2,varnames,nr;

    clear f1,f2,fout;

get1:

    if infile1 $== "";
        Print "Name of input file 1: ";;
        infile1 = cons;
        print;
    endif;
get2:

    if infile2 $== "";
        Print "Name of input file 2: ";;
        infile2 = cons;
        print;
    endif;

    if outfile $== "";
        Print "Name of output file: ";;
        outfile = cons;
        print;
    endif;

    open f1 = ^infile1;
    if f1==-1;
        print "Input file 1: " infile1 " not found";
        infile1 = "";
        goto get1;
    endif;
    if iscplxf(f1);
        errorlog "ERROR: Not implemented for complex data sets.";
        end;
    endif;

    open f2 = ^infile2;
    if f2==-1;
        print "Input file 2: " infile2 " not found";
        infile2 = "";
        goto get2;
    endif;
    if iscplxf(f2);
        errorlog "ERROR: Not implemented for complex data sets.";
        end;
    endif;

    varnames = getname(infile1);

    if indcv(varnames,getname(infile2)) /= seqa(1,1,rows(varnames));
        errorlog "Variables in each input file must be identical";
        goto errout;
    endif;

    if keyvar $/= "";
        goto havit;
    endif;

    format 8,8;
retry1:

    print "Variables are:";
    print $varnames';
    print "Name of key variable: ";;
    keyvar = cons;
    print;
havit:

    inx = indcv(keyvar,varnames);
    if scalmiss(inx);
        print "Variable " keyvar " not found";
        goto retry1;
    endif;

    if not keytyp;
        print "Sort order:";
        print "     1   numeric key, ascending order";
        print "     2   character key, ascending order";
        print "    -1   numeric key, descending order";
        print "    -2   character key, descending order";
        print;
        print "   ? ";;
        keytyp = stof(cons);
    print;
    endif;
    if keytyp < 0;
        ord = 0;
        keytyp = -keytyp;
    else;
        ord = 1;
    endif;

    create fout = ^outfile with ^varnames,0,typef(f1);
    if keytyp==2 and (typef(f1) /= 8 or typef(f2) /= 8);
        errorlog "WARNING - Sort is character type, data set not double preci"\
            "sion.";
    endif;
    if fout==-1;
        errorlog "Can't open output file: " $+ outfile;
        goto errout;
    endif;

    nr = 3000/colsf(f1);    /* !!! Number of rows to read in finish loop  */

    b1 = readr(f1,1);
    b2 = readr(f2,1);

    ws = 1;         /* is set to 1 by program if write is successful  */

    if keytyp==2;
        gosub chartyp;
    else;
        gosub numtyp;
    endif;
    if fstate==1;
        goto finish1;
    elseif fstate==2;
        goto finish2;
    else;
        goto diskfull;
    endif;

finish1:

    ws = writer(fout,b1);
    do while ws;
        if eof(f1);
            goto out;
        endif;
        b1 = readr(f1,nr);
        ws = writer(fout,b1)==rows(b1);
    endo;
    goto diskfull;

finish2:

    ws = writer(fout,b2);
    do while ws;
        if eof(f2);
            goto out;
        endif;
        b2 = readr(f2,nr);
        ws = writer(fout,b2)==rows(b2);
    endo;

diskfull:

    errorlog "\nDisk Full - Output file incomplete";
    goto errout;

out:

    call close(f1);
    call close(f2);
    call close(fout);
    retp;
errout:

    call close(f1);
    call close(f2);
    call close(fout);
    end;
/* ======================================================================== */
/* -------------------------- Subroutines Follow -------------------------- */
/* ======================================================================== */

/* =============================== */
/* ====== Numeric Key Sort ======= */
/* =============================== */

numtyp:

    /* ============== code for ascending order ================== */
    if ord==1;
        do while ws;        /* do while write successful */
            if b1[1,inx] < b2[1,inx];
                ws = writer(fout,b1);
                if eof(f1);
                    fstate = 2;
                    return;
                endif;
                b1 = readr(f1,1);
            else;
                ws = writer(fout,b2);
                if eof(f2);
                    fstate = 1;
                    return;
                endif;
                b2 = readr(f2,1);
            endif;
        endo;
        fstate = -1;

    /* ============ code for descending order ============= */
    else;

        do while ws;        /* do while write successful */
            if b1[1,inx] > b2[1,inx];
                ws = writer(fout,b1);
                if eof(f1);
                    fstate = 2;
                    return;
                endif;
                b1 = readr(f1,1);
            else;
                ws = writer(fout,b2);
                if eof(f2);
                    fstate = 1;
                    return;
                endif;
                b2 = readr(f2,1);
            endif;
        endo;
        fstate = -1;
    endif;

    return;

/* =============================== */
/* ===== Character Key Sort ====== */
/* =============================== */

chartyp:

    /* =========== code for ascending order =============== */
    if ord==1;
        do while ws;        /* do while write successful */
            if b1[1,inx] $< b2[1,inx];
                ws = writer(fout,b1);
                if eof(f1);
                    fstate = 2;
                    return;
                endif;
                b1 = readr(f1,1);
            else;
                ws = writer(fout,b2);
                if eof(f2);
                    fstate = 1;
                    return;
                endif;
                b2 = readr(f2,1);
            endif;
        endo;
        fstate = -1;

    /* ============ code for descending order ============= */
    else;

        do while ws;        /* do while write successful */
            if b1[1,inx] $> b2[1,inx];
                ws = writer(fout,b1);
                if eof(f1);
                    fstate = 2;
                    return;
                endif;
                b1 = readr(f1,1);
            else;
                ws = writer(fout,b2);
                if eof(f2);
                    fstate = 1;
                    return;
                endif;
                b2 = readr(f2,1);
            endif;
        endo;
        fstate = -1;
    endif;

    return;
/* ====================== End of Subroutines ==================== */

endp;

/*
**> mergeby
**
**  Purpose:    To merge two sorted files by a common variable.
**
**  Format:     mergeby(infile1,infile2,outfile,keytyp);
**
**  Inputs:     infile1    string, name of input file 1.
**
**              infile2    string, name of input file 2.
**
**              outfile    string, name of output file.
**
**              keytyp     scalar, data type of key variable.
**
**                          1 - numeric
**                          2 - character
**
**  Remarks:    This will combine the variables in the two files
**              to create a single large file.  The following
**              assumptions hold:
**
**                   1. Both files have a single (key) variable in
**                      common and it is the first variable.
**
**                   2. All of the values of the key variable are unique.
**
**                   3. Each file is already sorted on the key variable.
**
**              The output file will contain the key variable in
**              its first column.
**
**              It is not necessary for the two files to have the
**              same number of rows. For each row for which the
**              key variables match, a row will be created in the
**              output file. OUTFILE will contain the columns
**              from INFILE1 followed by the columns of INFILE2
**              minus the key column from the second file.
**

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
ww亚洲ww在线观看国产| 欧美日韩国产天堂| 国产精品入口麻豆九色| 韩国女主播成人在线观看| 4438成人网| 日本怡春院一区二区| 欧美一级免费大片| 国产综合色在线视频区| 欧美国产在线观看| av电影天堂一区二区在线观看| 国产日韩v精品一区二区| 成人av在线观| 亚洲在线成人精品| 欧美人牲a欧美精品| 免费人成精品欧美精品| 国产性做久久久久久| 色综合久久综合网97色综合| 亚洲午夜久久久| 日韩久久精品一区| 成人精品国产一区二区4080| 一区二区三区国产精品| 在线不卡一区二区| 国产寡妇亲子伦一区二区| 国产精品国产三级国产aⅴ原创| 色先锋aa成人| 日本成人在线电影网| 国产日韩欧美高清| 欧美三级资源在线| 国产丶欧美丶日本不卡视频| 亚洲少妇屁股交4| 日韩欧美激情四射| 99精品欧美一区| 日韩vs国产vs欧美| 国产精品女同一区二区三区| 欧美性极品少妇| 国产福利91精品| 亚洲国产美国国产综合一区二区| 精品国产乱码久久久久久1区2区 | 不卡高清视频专区| 亚洲国产精品久久久久婷婷884| 日韩欧美一区二区不卡| 91亚洲国产成人精品一区二区三| 日韩av午夜在线观看| 中文子幕无线码一区tr| 制服视频三区第一页精品| 成人综合婷婷国产精品久久蜜臀| 亚洲国产成人高清精品| 欧美韩国一区二区| 欧美岛国在线观看| 欧美日韩一区高清| 成人免费视频国产在线观看| 日av在线不卡| 一个色在线综合| 国产精品久久久久一区| 精品国一区二区三区| 欧美日韩一区在线| 99国产精品久久久久久久久久| 蜜桃视频免费观看一区| 亚洲成av人片在www色猫咪| 国产精品久久久久影院色老大 | 久久久国产午夜精品| 欧美精品视频www在线观看| 99久久婷婷国产综合精品| 国内精品在线播放| 蜜臀av性久久久久蜜臀aⅴ流畅| 一区二区三区在线播放| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 久久久综合九色合综国产精品| 欧美一级搡bbbb搡bbbb| 在线观看91精品国产麻豆| 在线中文字幕一区二区| 91丨九色丨国产丨porny| 国产suv精品一区二区三区| 亚洲视频在线观看一区| 亚洲人成网站在线| 中文字幕一区二区三区四区不卡| 久久久精品日韩欧美| 精品播放一区二区| 久久久www免费人成精品| 日韩视频一区在线观看| 精品久久久影院| 欧美成人福利视频| 2014亚洲片线观看视频免费| 欧美精品一区二区三区在线播放| 日韩精品一区二区三区在线播放| 日韩一区和二区| 日韩精品一区二区三区视频 | 亚洲电影一区二区三区| 亚洲图片欧美综合| 亚洲小少妇裸体bbw| 亚洲成av人片在线观看无码| 日韩电影免费在线看| 免费观看在线色综合| 久久99国产精品麻豆| 久久超级碰视频| 精品亚洲porn| 国产精品911| 成年人网站91| 91黄视频在线| 日韩欧美精品在线视频| 久久久www成人免费无遮挡大片| 国产精品素人视频| 亚洲免费av高清| 日韩中文字幕av电影| 国产一本一道久久香蕉| 成人av网在线| 欧美日韩精品高清| 欧美电影免费观看高清完整版在 | 久久青草国产手机看片福利盒子| 日本一区二区电影| 一区二区三区欧美在线观看| 日本 国产 欧美色综合| 国产一区二区三区视频在线播放| voyeur盗摄精品| 欧美日韩黄视频| 26uuu色噜噜精品一区二区| 中文字幕国产精品一区二区| 一区二区三区鲁丝不卡| 精品一区二区在线视频| 99精品视频在线免费观看| 欧美日韩国产精选| 中文字幕第一区综合| 亚洲无线码一区二区三区| 国产一区二区伦理| 欧洲国内综合视频| 久久久综合精品| 亚洲一区二区三区视频在线| 国产麻豆9l精品三级站| 欧美日韩久久久一区| 中文字幕不卡在线| 美日韩一区二区三区| 色婷婷av一区| 国产精品久久久一本精品 | 午夜视频一区二区| 国产麻豆一精品一av一免费| 欧美三级视频在线播放| 中文成人综合网| 日韩精品乱码免费| 日本精品一区二区三区四区的功能| 欧美一区二区精品在线| 亚洲免费大片在线观看| 国产一区二区精品久久| 欧美裸体一区二区三区| 国产精品美女久久福利网站| 久久国产精品免费| 欧美疯狂做受xxxx富婆| 中文字幕一区二区在线观看| 免费成人美女在线观看.| 欧美无砖专区一中文字| 国产精品久久久久一区| 国产精品538一区二区在线| 欧美精品久久99久久在免费线| 亚洲日本一区二区| 风流少妇一区二区| 久久精品这里都是精品| 麻豆国产欧美日韩综合精品二区 | 国产精品一二三区| 日韩视频免费直播| 日韩av在线发布| 欧美亚洲一区三区| 亚洲免费三区一区二区| 91丝袜国产在线播放| 国产精品久久久久久一区二区三区| 国产精品伊人色| 久久久久青草大香线综合精品| 蜜芽一区二区三区| 欧美一区二区在线观看| 日韩精品国产精品| 欧美电影在线免费观看| 亚洲成人av一区| 欧美日韩视频一区二区| 午夜私人影院久久久久| 欧美日韩你懂得| 亚洲成av人**亚洲成av**| 欧美日韩亚洲综合在线| 日韩激情视频在线观看| 日韩一卡二卡三卡四卡| 欧美a级理论片| 精品国产伦一区二区三区观看体验| 蜜臀国产一区二区三区在线播放| 日韩一区二区在线观看| 久久99国产精品成人| 亚洲少妇中出一区| 色综合天天综合网天天狠天天| 亚洲欧美电影院| 欧美日韩小视频| 美女www一区二区| 欧美成人精品1314www| 国产成人福利片| 亚洲欧美在线另类| 欧美在线不卡视频| 奇米一区二区三区av| 久久久久青草大香线综合精品| 成人美女视频在线看| 亚洲一区免费视频| 日韩视频在线观看一区二区| 福利电影一区二区| 亚洲一区在线视频观看| 欧美xxxxx牲另类人与| 国产成人免费在线视频|