| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1440 人关注过本帖
标题:编译后为什么文件和VFP环境中结果不一样
取消只看楼主 加入收藏
ttlover7613
Rank: 2
等 级:论坛游民
威 望:2
帖 子:48
专家分:85
注 册:2016-8-29
结帖率:83.33%
收藏
已结贴  问题点数:20 回复次数:3 
编译后为什么文件和VFP环境中结果不一样
在vfp软件中执行的结果
图片附件: 游客没有浏览图片的权限,请 登录注册

编译后执行的结果,为什么不一致呀
图片附件: 游客没有浏览图片的权限,请 登录注册
搜索更多相关主题的帖子: 软件 
2017-03-11 09:17
ttlover7613
Rank: 2
等 级:论坛游民
威 望:2
帖 子:48
专家分:85
注 册:2016-8-29
收藏
得分:0 
回复 楼主 ttlover7613
自己写的排班表,编译后没有日期。
2017-03-11 09:19
ttlover7613
Rank: 2
等 级:论坛游民
威 望:2
帖 子:48
专家分:85
注 册:2016-8-29
收藏
得分:0 
回复 3楼 hyswcyh
就是同一个表单,一个在VFP里运行,一个是编译后运行。
2017-03-11 09:46
ttlover7613
Rank: 2
等 级:论坛游民
威 望:2
帖 子:48
专家分:85
注 册:2016-8-29
收藏
得分:0 
回复 5楼 hyswcyh
经过反复查找,终于找到问题了。
Pxq=ALLTRIM(CDOW(DATE(2017,3,1)))
VFP环境里显示Wednesday
Windows里显示星期三
程序里是用英文星期控制,所以结果不一致。
谢谢大家!我顺便把代码发出来,大家共勉
自动产生一年12个月的每天日期和星期,关判断润平年。
IF USED('RqK')
SELECT Rqk
USE
ENDIF
SELECT 0
USE dbf\Rqk
SELECT rqk
SET ORDER TO dts1

Pyear=YEAR(DATE())
for j=1 to 12
 pmonth=j

Pxq=''
Ok=.f.
if mod(pyear,4)=0
    ok=.t.
    if mod(pyear,100)=0
        ok=.f.
        if mod(pyear,400)=0
            ok=.t.
        endif
    endif
endif
if ok
    pday=29
else
    pday=28
endif

DO CASE
  CASE pmonth=1
    Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(Pks)
   
    SEEK pyue1
    IF FOUND()
      RETURN
       else
   i=1
  DO WHILE i<=31
    Pxq=ALLTRIM(CDOW(DATE(Pyear,Pmonth,i)))
    IF (i=1) OR (pxq='Monday')
      SELECT Rqk
      APPEND BLANK
      REPLACE keyid WITH Pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH ALLTRIM(STR(i,2))
   
     CASE pxq='Tuesday'
     REPLACE dow2 WITH ALLTRIM(STR(i,2))
   
     CASE pxq='Wednesday'
     REPLACE dow3 WITH ALLTRIM(STR(i,2))
     CASE pxq='Thursday'
     REPLACE dow4 WITH ALLTRIM(STR(i,2))
     CASE pxq='Friday'
     REPLACE dow5 WITH ALLTRIM(STR(i,2))
     CASE pxq='Saturday'
     REPLACE dow6 WITH ALLTRIM(STR(i,2))
      
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
   
  ENDDO
  IF CDOW(DATE(Pyear,Pmonth,31))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   
    ENDIF
   endif
  CASE pmonth=2
    Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
   
     
      RETURN
      
       else
  i=1
  DO WHILE i<=pday
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   
    ENDCASE
    i=i+1
                                                
  ENDDO
  IF CDOW(DATE(Pyear,Pmonth,pday))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  
  endif
  CASE pmonth=3
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=31
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks, dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  enddo
  IF CDOW(DATE(Pyear,Pmonth,31))<>'Sunday'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  endif
 CASE pmonth=4
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=30
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  ENDDO
   IF CDOW(DATE(Pyear,Pmonth,30))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  endif
   CASE pmonth=5
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=31
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  enddo
   IF CDOW(DATE(Pyear,Pmonth,31))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  endif
  CASE pmonth=6
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(Pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=30
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks, dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  enddo
  IF CDOW(DATE(Pyear,Pmonth,30))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  endif
CASE pmonth=7
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=31
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks ,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  enddo
  IF CDOW(DATE(Pyear,Pmonth,31))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  endif
CASE pmonth=8
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=31
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                            
  ENDDO
  IF CDOW(DATE(Pyear,Pmonth,31))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  
  endif
CASE pmonth=9
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=30
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  enddo
   IF CDOW(DATE(Pyear,Pmonth,30))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+'0'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  endif
CASE pmonth=10
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=31
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  enddo
  IF CDOW(DATE(Pyear,Pmonth,31))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  endif
CASE pmonth=11
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       else
  i=1
  DO WHILE i<=30
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  ENDDO
  IF CDOW(DATE(Pyear,Pmonth,30))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
    endif
  endif
CASE pmonth=12
  
  Pyue1=ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'+ALLTRIM(pks)
    SEEK pyue1
    IF FOUND()
      RETURN
       ELSE
       i=1
  DO WHILE i<=31
    Pxq=CDOW(DATE(Pyear,Pmonth,i))
    IF (i=1) OR (pxq='Monday')
    SELECT Rqk
    APPEND BLANK
    REPLACE keyid WITH pks,dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
   endif
    DO CASE
     CASE pxq='Monday'
     REPLACE dow1 WITH STR(i,2)
     CASE pxq='Tuesday'
     REPLACE dow2 WITH STR(i,2)
     CASE pxq='Wednesday'
     REPLACE dow3 WITH STR(i,2)
     CASE pxq='Thursday'
     REPLACE dow4 WITH STR(i,2)
     CASE pxq='Friday'
     REPLACE dow5 WITH STR(i,2)
     CASE pxq='Saturday'
     REPLACE dow6 WITH STR(i,2)
     CASE pxq='Sunday'
     REPLACE dow7 WITH STR(i,2)
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
    ENDCASE
    i=i+1
                                                      
  enddo
  IF CDOW(DATE(Pyear,Pmonth,31))<>'Sunday'
    appe blank
     REPLACE keyid WITH Pks,ppsj WITH '08:00-12:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '14:00-18:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
     appe blank
     REPLACE keyid WITH Pks,ppsj WITH '18:00-08:00',dts1 WITH ALLTRIM(STR(pyear,4))+'年'+ALLTRIM(STR(pmonth,2))+'月'
    endif
endif
 
  
 ENDCASE
ENDFOR
2017-03-13 10:16
快速回复:编译后为什么文件和VFP环境中结果不一样
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.034969 second(s), 10 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved