🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.program
Article #862

��Foxpro�лָ���ɾ�����

#862
From: ���ܵ�Сʨ
Date: Thu, 07 May 1998 00:00
75 lines
4990 bytes
   ��Foxpro��ݿ��е���ݽ���ɾ���Լ���������ַ���:
    ����DOS����Del�������Foxpro����DELETE FILE����ֱ��ɾ��
��ݿ��ļ���
    ����Foxpro�д���ݿ�,��PACK�����������ɾ���ǵļ�¼
��
    ����Foxpro�д���ݿ�,��ZAP����ɾ����ݿ��е����м�¼��
    ���ڵ�һ�ַ���,����DOS�ṩ��UNDELETE����ֱ�ӻָ������ڵ�
���ַ���,����Foxprɾ����ݵĹ�����Ƚ�δ��ɾ���ǵļ�¼����
ͷ������һ�����ļ�,Ȼ����ɾ��ԭ��ݿ��ļ�,����,����PACK����
��ɾ��������Ȼ����DOS�ṩ��UNDELETE����ֱ�ӻָ������ڵ���
�ַ���,��Щ������������PCTools�ȹ�������ָ�,����������,����
����ͨ��������ʹ��,���������������п����ƻ�������ݡ�����
�ڳ���о���Foxpro��ݿ�ṹ�Ļ���,����Foxpro�ĵͼ���ʽ��
������������ͨ�ûָ�����
    �ó���Ĺؼ����ڻָ���ݿ��ļ��Ĵ�С����ݿ��еļ�¼��
�ļ��Ĵ�С���ɺ���C HSIZE()ֱ�ӻָ�;��¼��ɸ����ݿ�Ĵ�С
�ͼ�¼�ij������,��������ݿ�ͷ���ĵ�5��8���ֽ�,�ҵ�λ�ֽ�
��ǰ,��λ�ֽ��ں�,�ö��������ʾ(һ��Foxpro��ݿ���鼮�о�
�н���,�ڴ˲���׸��)�������嵥����:
    clear
    clear all
    set talk off
    name=space(12)
    size=0
    @10,20 say��������Ԥ�ָ���ݿ��ȫ��:'get name
    @12,20 say��������Ԥ�ָ���ݿ�Ĵ�С:'get sizepict��9999
999999'
    read
    use &name
    head=header ()    &&����ݿ��ͷ����ռ���ֽ���
    reclen=recsize()  &&����ݿ��м�¼�ij���
    jls=int((size-head1)/reclen)   &&�����ݿ��С�ͼ�¼��
����ü�¼��
    zjs1=chr(mod(jls,256))  &&��ݿ�ͷ��5���ֽڵ�����
    jls=int((jls/256)
    zjs2=chr(mod(jls,256))  &&��ݿ�ͷ��6���ֽڵ�����
    jls=int(jls/256)
    zjs3=chr(mod(jls,256))  &&��ݿ�ͷ��7���ֽڵ�����
    jls=int(jls/256)
    zis4=chr(mod(jls,256))  &&��ݿ�ͷ��8���ֽڵ�����
    jls=int(jls/256)
    use
    handle=fopen(name,2)
    =fchsize(handle,size)   &&�ı��ļ��Ĵ�С
    =fclose(handle)
    handle=fopen(name,2)
    =fseek(handle,4,0)
    =fwrite(handle,zjs1)    &&�ı��ļ��ļ�¼��
    =fwrite(handle,zjs2)
    =fwrite(handle,zjs3)
    =fwrite(handle,zjs4)
    =fclose(handle)
    delete file &name
    filename=��?'+alltrim(substr(name,2,10))
    run undelete &filename/all
    run ren &filename &name
    retu
    ʹ�øó���ʱ,����������ɾ��ݿ��ȫ��,Ȼ������ɾ����ǰ��
�ݿ��ļ��Ĵ�С(��֪���ļ���Сֱ�����뼴�ɻָ�ȫ�����;��֪
���ļ���С��������һ����ֵ,�øù���ֵ�ָ���,����ݿ�鿴��
��,����ݻָ���ȫ,˵������ֵ��С,��ZAP����ɾ�����,�������
ֵ���»ָ�ֱ�����ȫ���ָ�Ϊֹ)��
    �ó�����LX-P5/75PCI���ϡ�DOS6.22�¡�Foxpro2.6 for DOS��
��������ͨ��,����Ȥ�Ķ��߲���һ�ԡ�

--
 ________ _____          _____        ______________  _____ 
 ___  __ \___(_)________ ___(_)       __  ___/___  /_ ___(_)
 __  /_/ /__  / ___  __ \__  /        _____ \ __  __ \__  / 
 _  ____/ _  /  __  /_/ /_  /         ____/ / _  / / /_  /  
 /_/      /_/   _  .___/ /_/          /____/  /_/ /_/ /_/   
                /_/                                         

�� ��Դ:���ϴ�С�ٺ���Ϣ����վ bbs.nju.edu.cn��[FROM: hsia.nju.edu.cn]
Technical Details
Message-ID: <3OOYhT$tr5@bbs.nju.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: fc86e,8da69ee6c0ff3573,start
X-Google-Attributes: gidfc86e,public
From: pipishi.bbs@bbs.nju.edu.cn (���ܵ�Сʨ)
Subject: ��Foxpro�лָ���ɾ�����
Date: 1998/05/07
Message-ID: <3OOYhT$tr5@bbs.nju.edu.cn>
X-Deja-AN: 351560191
X-Filename: Programming/M.894548525.A
Organization: nju_bbs
Newsgroups: cn.bbs.comp.program