VFP程序设计方面简单问题,帮忙看下
1个回答
展开全部
菜单代码:
* *********************************************************
* *
* * 2015-06-02 菜单1.MPR 22:42:51
* *
* *********************************************************
* *
* * 作者姓名
* *
* * Copyright (C) 2015 公司名称
* * 地址
* * 城市, Zip
* * 国家
* *
* * 说明:
* * This PROGRAM was automatically generated BY GENMENU.
* *
* *********************************************************
* *********************************************************
* *
* * 设置代码
* *
* *********************************************************
*
SET TALK OFF
CLEAR
DO WHILE .t.
* *********************************************************
* *
* * 菜单定义
* *
* *********************************************************
*
SET SYSMENU TO
SET SYSMENU AUTOMATIC
DEFINE PAD _4d61coniq OF _MSYSMENU PROMPT "运行" COLOR SCHEME 3
DEFINE PAD _4d61conir OF _MSYSMENU PROMPT "退出" COLOR SCHEME 3
ON SELECTION PAD _4d61coniq OF _MSYSMENU do prog1.prg
ON SELECTION PAD _4d61conir OF _MSYSMENU ;
DO _4d61conis ;
IN LOCFILE("MICROSOFT VISUAL FOXPRO 9\菜单1" ,"MPX;MPR|FXP;PRG" ,"WHERE is 菜单1?")
* *********************************************************
* *
* * 清除代码和过程
* *
* *********************************************************
*
READ valid .f.
ENDDO
* *********************************************************
* *
* * _4D61CONIS ON SELECTION PAD
* *
* * Procedure Origin:
* *
* * From Menu: 菜单1.MPR, Record: 4
* * Called By: ON SELECTION PAD
* * Prompt: 退出
* * Snippet: 1
* *
* *********************************************************
*
PROCEDURE _4d61conis
close database
clear all
set sysmenu to default
cancel
================================================================================
程序prog1.prg代码:
SET TALK OFF
SET SAFETY OFF
CLEAR
USE tj
COPY TO new
USE new
FOR i=100 TO 500
findd=.f.
FOR j=2 TO INT(i/2)
IF MOD(i,j)=0
findd=.t.
EXIT
ELSE
LOOP
ENDIF
ENDFOR
IF .not.findd
? i
APPEND BLANK
REPLACE 素数 WITH i
ENDIF
ENDFOR
BROWSE
RETURN
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询