| ²é¿´: 500 | »Ø¸´: 6 | ||
| ¡¾½±Àø¡¿ ±¾Ìû±»ÆÀ¼Û2´Î£¬×÷ÕßfspdlhÔö¼Ó½ð±Ò 2 ¸ö | ||
| µ±Ç°Ö÷ÌâÒѾ´æµµ¡£ | ||
[×ÊÔ´]
¡¾Ô´´¡¿Ò»¸ö×Ô±àµÄ¶ÁÈ¡Îı¾ÎļþÊý¾ÝµÄº¯Êý
|
||
|
ÈçÌ⣬×Ô±àÁËÒ»¸öº¯Êý£¬×ÔÒѸоõÓÃÆðÀ´»¹ÊǺܷ½±ãµÄ£¬ÈçÓÐÐèÒª¿ÉÒÔÏÂÔØ¡£ ¿ÉÒÔ¶ÁÈ¡Õû¸öÎļþ£¬¶ÁÈ¡µÚNÐУ¬¶ÁÈ¡µÚMÐе½µÚNÐУ¬¶ÁÈ¡µÚMÐе½µ¹ÊýµÚNÐУ¬¶ÁÈ¡µÚM´Î£¨Ò²¿ÉÒÔÊÇ×îºóÒ»´Î¡¢µ¹ÊýµÚM´Î£©³öÏÖ×Ö·û´®strµÄÐпªÊ¼£¨»ò½áÊø£©µÄÊý¾Ý£¬µÈµÈ¡£ ÒÔÏÂÊÇ×Ô±àµÄ°ïÖúÎĵµ¡£ %Get text from file % %Input paraments: % fid: filename or the indicater of the file % sea_tag: find the target text from the beginningning of the text or % the current position % 0: the beginningning of the file % 1: the current position % beg profix: paraments to point out the beginning of the output text % end profix: paraments to point out the endding of the output text % tag: target string, a string inclued in the target line % mode: the method to match the target line % 1: comletely matched % 2: beginning matched including blanks % 3: beginning matched ignoring blanks % 4: included % count: the Nth of the target line % offset: offset from the target line % negative ingeger: Nth line before from the target line % zero: the target line % positive integer: Nth line followed from the target line % %The number of input paraments: % 1 y=GetFileText( fid ) % 2 y=GetFileText( fid, offset ) % 3 y=GetFileText( fid, sea_tag, offset ) % 4 y=GetFileText( fid, sea_tag, beg_offset, end_offset ) % 6 y=GetLineText( fid, beg_sea_tag, % beg_str,beg_mode, beg_count, beg_offset ) % 7 y=GetFileText( fid, beg_sea_tag, beg_offset, % end_str, end_mode, end_count, end_offset ) % 7 y=GetFileText( fid, beg_sea_tag, % beg_str, beg_mode, beg_count, beg_offset, % end_offset ) % 10 y=GetFileText( fid, beg_sea_tag, % beg_str, beg_mode, beg_count, beg_offset, % end_str, end_mode, end_count, end_offset ) [ Last edited by sunxiao on 2009-3-8 at 13:11 ] |
» ²ÂÄãϲ»¶
26µ÷¼Á 086003
ÒѾÓÐ6È˻ظ´
Ò»Ö¾Ô¸ÉϺ£º£Ñó´óѧ083200ʳƷѧ˶£¬Çóµ÷¼Á£¬½ÓÊÜÆäËûרҵ083200
ÒѾÓÐ4È˻ظ´
²ÄÁÏ»¯¹¤306·ÖÕÒºÏÊʵ÷¼Á
ÒѾÓÐ4È˻ظ´
292·Ö£¬²ÄÁÏÓ뻯¹¤£¬ÉêÇëµ÷¼Á
ÒѾÓÐ24È˻ظ´
ÊýÒ»Ó¢Ò»274»úеµ÷¼Á
ÒѾÓÐ5È˻ظ´
²ÄÁÏר˶322·Ö
ÒѾÓÐ4È˻ظ´
Ò»Ö¾Ô¸211£¬»¯Ñ§Ñ§Ë¶£¬310·Ö£¬±¾¿ÆÖصãË«·Ç£¬Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
Ò»Ö¾Ô¸°²»Õij211 0703»¯Ñ§×Ü·Ö339Çóµ÷¼Á
ÒѾÓÐ3È˻ظ´
±¾9Ò»Ö¾Ô¸2 0854µÍ·Öר˶286Çóµ÷¼Á
ÒѾÓÐ6È˻ظ´
ÇóÉúÎïѧרҵµ÷¼Á-332·Ö
ÒѾÓÐ3È˻ظ´
¶ÁÈ¡ÎļþµÄÀý×Ó
|
>> type a.txt 01 02 03 01 04 05 06 01 07 08 01 09 10 >> GetFileText('a.txt') ans = '01' '02' '03 01' '04' '05' '06 01' '07' '08 01' '09' '10' >> GetFileText('a.txt',4) ans = 04 >> GetFileText('a.txt',0,4,-2) ans = '04' '05' '06 01' '07' '08 01' '09' >> GetFileText('a.txt',0,'01',4,1,0) ans = 01 >> GetFileText('a.txt',0,'01',4,2,0) ans = 03 01 >> GetFileText('a.txt',0,'01',4,2,-1) ans = 02 >> GetFileText('a.txt',0,'01',4,2,1) ans = 04 >> GetFileText('a.txt',0,'01',4,-1,-2) ans = 06 01 >> GetFileText('a.txt',0,'01',4,-2,0) ans = 06 01 >> GetFileText('a.txt',0,'01',4,-2,0,-1) ans = '06 01' '07' '08 01' '09' '10' >> GetFileText('a.txt',0,'01',4,1,0,'01',4,-1,0) ans = '01' '02' '03 01' '04' '05' '06 01' '07' '08 01' >> GetFileText('a.txt',0,3,'01',4,3,0) ans = '03 01' '04' '05' '06 01' '07' '08 01' |
2Â¥2009-03-02 22:43:40
3Â¥2009-03-03 08:55:18
woshilsh
ÈÙÓþ°æÖ÷ (Ö°Òµ×÷¼Ò)
- Ó¦Öú: 43 (СѧÉú)
- ¹ó±ö: 10.33
- ½ð±Ò: 21115.1
- Ìû×Ó: 3777
- ÔÚÏß: 639.7Сʱ
- ³æºÅ: 293038
4Â¥2009-03-03 09:15:06
5Â¥2009-03-26 01:46:35
7Â¥2009-04-02 23:47:41
¼òµ¥»Ø¸´
dnp6Â¥
2009-03-26 14:37
»Ø¸´














»Ø¸´´ËÂ¥
