亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
国产女同性恋一区二区| 亚洲mv大片欧洲mv大片精品| 国产精品毛片大码女人| 亚洲精品高清视频在线观看| 国产激情视频一区二区在线观看 | 亚洲人成小说网站色在线 | 国产精品电影院| 日韩精品久久理论片| 国产成人精品影视| 日韩美女视频一区二区在线观看| 日韩一区在线播放| 国产在线国偷精品产拍免费yy| 日本高清成人免费播放| 国产亚洲欧美日韩在线一区| 午夜不卡av在线| 在线视频欧美区| 亚洲女同一区二区| 国产福利不卡视频| 26uuu国产在线精品一区二区| 天天综合网天天综合色| 欧美亚洲免费在线一区| 亚洲欧洲精品一区二区三区不卡| 国产大陆亚洲精品国产| 日韩精品中文字幕在线一区| 日本vs亚洲vs韩国一区三区二区 | 五月天亚洲精品| 在线中文字幕一区| 亚洲三级在线免费观看| 99久久伊人精品| 国产精品久久看| k8久久久一区二区三区| 中文成人av在线| 不卡一区二区三区四区| 亚洲人精品一区| 色狠狠色噜噜噜综合网| 亚洲国产三级在线| 欧美精品aⅴ在线视频| 日本午夜精品一区二区三区电影| 欧美精品99久久久**| 日本欧美久久久久免费播放网| 欧美酷刑日本凌虐凌虐| 日日夜夜免费精品视频| 日韩欧美国产三级| 国产精品夜夜嗨| 日本一二三四高清不卡| 一本一道久久a久久精品| 一区二区视频在线| 欧美亚洲国产怡红院影院| 午夜免费久久看| 国产精品福利av| 99国产精品视频免费观看| 一区二区三区在线观看欧美| 欧美亚洲国产怡红院影院| 日本在线观看不卡视频| 久久精品一区蜜桃臀影院| av在线不卡观看免费观看| 亚洲妇熟xx妇色黄| 欧美精品一区二区三区很污很色的| 国产在线一区观看| 综合久久久久久| 91精品国产色综合久久| 国产麻豆91精品| 亚洲人成网站在线| 欧美一级欧美三级在线观看| 韩国精品在线观看| 亚洲图片激情小说| 4438x成人网最大色成网站| 韩国av一区二区三区四区| 亚洲欧洲在线观看av| 制服丝袜av成人在线看| 国产99久久久国产精品潘金| 中文字幕一区二区三区不卡| 欧美福利一区二区| 成人激情文学综合网| 轻轻草成人在线| 日韩毛片精品高清免费| 欧美不卡视频一区| 99久久久国产精品免费蜜臀| 精品伊人久久久久7777人| 亚洲欧美一区二区三区久本道91 | 精品国产伦一区二区三区免费| 99精品一区二区| 久久99久久精品| 一区二区三区欧美在线观看| 2023国产精品| 欧美精选一区二区| av高清久久久| 国产精品一区二区三区网站| 亚洲一区二区三区自拍| 国产精品久99| 久久九九久久九九| 日韩片之四级片| 欧美军同video69gay| 一本色道久久加勒比精品 | 欧美中文字幕不卡| 国产精品一二三| 久久精品国产精品青草| 亚洲一区二区三区四区在线免费观看 | 亚洲国产另类精品专区| 国产精品久久久久一区二区三区| 亚洲精品在线三区| 91精品国产综合久久久久久久 | 成人精品电影在线观看| 国产福利精品一区| 国产经典欧美精品| 国产精品亚洲人在线观看| 麻豆成人免费电影| 免费精品99久久国产综合精品| 亚洲电影一区二区三区| 夜夜精品视频一区二区 | 久久免费的精品国产v∧| 欧美一级电影网站| 欧美日韩aaaaaa| 91精品国产高清一区二区三区| 欧美性色黄大片| 在线观看视频欧美| 欧美无人高清视频在线观看| 色婷婷综合激情| 91黄色小视频| 欧美视频在线观看一区二区| 色综合天天综合色综合av| 99久久精品情趣| 欧美在线一区二区| 在线电影欧美成精品| 欧美一区二区三区人| 日韩一区二区精品在线观看| 日韩欧美国产三级| 久久久噜噜噜久噜久久综合| 久久综合成人精品亚洲另类欧美 | 成人午夜电影久久影院| 成人一区二区三区在线观看| 岛国精品一区二区| 成人免费视频视频| 日本韩国欧美一区| 91麻豆精品国产91久久久 | 欧美精品一卡二卡| 日韩免费在线观看| 国产精品成人午夜| 石原莉奈一区二区三区在线观看| 免费在线观看日韩欧美| 国产99一区视频免费| 91亚洲永久精品| 欧美日韩高清一区二区| 日韩欧美在线不卡| 久久精品人人做| 亚洲精品国产a久久久久久| 日韩成人伦理电影在线观看| 国产精品一级在线| 在线观看www91| 精品少妇一区二区三区日产乱码 | 成人一区在线观看| 欧美日韩免费一区二区三区 | 欧美日韩在线综合| 精品99久久久久久| 亚洲精品福利视频网站| 精品一区二区三区蜜桃| av中文字幕亚洲| 精品人伦一区二区色婷婷| 成人免费在线观看入口| 日本一区中文字幕| av中文字幕一区| 久久婷婷色综合| 亚洲国产wwwccc36天堂| 成人一级黄色片| 日韩亚洲欧美在线| 亚洲激情中文1区| 成人一区在线观看| 日韩免费高清av| 亚洲第一精品在线| 99国产精品99久久久久久| 欧美va在线播放| 日韩精品一二三区| 91极品美女在线| 亚洲日穴在线视频| 国产乱色国产精品免费视频| 欧美另类久久久品| 亚洲毛片av在线| 成人午夜激情在线| 国产亚洲一区二区三区四区| 日本成人中文字幕| 欧美日精品一区视频| 亚洲精品中文在线观看| 国产99久久精品| 久久久噜噜噜久久中文字幕色伊伊| 视频一区二区三区在线| 一本一道综合狠狠老| 中文字幕一区二区不卡| 高清shemale亚洲人妖| www成人在线观看| 老司机午夜精品| 日韩一区二区在线看| 偷拍一区二区三区| 欧美日韩一区二区三区四区| 一区二区三区四区在线| 91免费看片在线观看| 亚洲色图欧美在线| 色域天天综合网| 一区二区视频在线| 欧美色图第一页| 日韩二区三区在线观看|