DELit

Информация о пользователе

Привет, Гость! Войдите или зарегистрируйтесь.


Вы здесь » DELit » О чем угодно » Ссылки и картинки (том 10)


Ссылки и картинки (том 10)

Сообщений 801 страница 850 из 1000

801

ты хоть знаешь, что такое программирование?

вот, недавно накатал:
* программа на FoxPro для превращения DBF-файла в xls-файл

set console off
set date DMY

select b
use C:\prgs\prihod1.dbf

private a, s, i, j, k, kk, l, n, m, tmp, FAT, RDE, SecondRow, StartGlobalBlock, List1, StartSST, z, DefColWidth, countfields, numberstr, logic, SI, DSI, EndOfBook, ContinueSST, last, CountFAT

sizeSST = 8224
Porcia = 8
*8224

DIMENSION fieldsinfo(1, 1)
DIMENSION aExtSST1(1)
DIMENSION aExtSST2(1)
DIMENSION arrDBCELL(1)

f = fcreate("C:\prgs\book1.xls")
flog =fcreate("C:\prgs\booklog.txt")

********************пишем сигнатуру 512 byte

a = Chr(208) + Chr(207) + Chr(17) + Chr(224) + Chr(161) + Chr(177) + Chr(26) + Chr(225)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
a = Chr(62) + Chr(0)
= fwrite(f, a)
a = Chr(3) + Chr(0)
= fwrite(f, a)
a = Chr(254) + Chr(255)
= fwrite(f, a)
a = Chr(9) + Chr(0)
= fwrite(f, a)
a = Chr(6) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)
CountFAT = fseek(f, 0, 1)
a = Chr(1) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
*Root Directory Entry
RDE = fseek(f, 0, 1)
a = Chr(25) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(16) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(254) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(254) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
*FAT
FAT = fseek(f, 0, 1)
a = Chr(24) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(255)
for i = 80 to 511
    = fwrite(f, a)
endfor

******* Global Block ***********

StartGlobalBlock = fseek(f, 0, 1)
a = Chr(9) + Chr(8)
= fwrite(f, a)
a = Chr(16) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(6)
= fwrite(f, a)
a = Chr(5) + Chr(0)
= fwrite(f, a)
a = Chr(136) + Chr(32)
= fwrite(f, a)
a = Chr(205) + Chr(7)
= fwrite(f, a)
a = Chr(193) + Chr(192) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(6) + Chr(3) + Chr(0) + Chr(0)
= fwrite(f, a)

*unknown 00E1
a = Chr(225) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(176) + Chr(4)
= fwrite(f, a)

*unknown 00C1
a = Chr(193) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

*unknown 00E2
a = Chr(226) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

*005C WRITEACCESS
a = Chr(92) + Chr(0)
= fwrite(f, a)
a = Chr(112) + Chr(0)
= fwrite(f, a)
a = Chr(4) + Chr(0) + Chr(0) + Chr(115) + Chr(101) + Chr(114) + Chr(103) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32) + Chr(32)
= fwrite(f, a)

*0042 CODEPAGE
a = Chr(66) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(176) + Chr(4)
= fwrite(f, a)

*0161 DSF
a = Chr(97) + Chr(1)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

*unknown 01C0
a = Chr(192) + Chr(1)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

*unknown 013D - (Lists?)
a = Chr(61) + Chr(1)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0)
= fwrite(f, a)

*unknown 009C
a = Chr(156) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(14) + Chr(0)
= fwrite(f, a)

* 0019 WindowProtect
a = Chr(25) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0012 Protect
a = Chr(18) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0013 Password
a = Chr(19) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

*unknown 01AF
a = Chr(175) + Chr(1)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

*unknown 01BC
a = Chr(188) + Chr(1)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 003D Window1
a = Chr(61) + Chr(0)
= fwrite(f, a)
a = Chr(18) + Chr(0)
= fwrite(f, a)
a = Chr(224) + Chr(1) + Chr(120) + Chr(0) + Chr(91) + Chr(59) + Chr(252) + Chr(33) + Chr(56) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(1) + Chr(0) + Chr(88) + Chr(2)
= fwrite(f, a)

* 0040 BACKUP
a = Chr(64) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 008D HIDEOBJ
a = Chr(141) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0022 "1904"
a = Chr(34) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 000E PRECISION
a = Chr(14) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0)
= fwrite(f, a)

*unknown 01B7
a = Chr(183) + Chr(1)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 00DA BOOKBOOL
a = Chr(218) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0031 FONT1
a = Chr(49) + Chr(0)
= fwrite(f, a)
a = Chr(34) + Chr(0)
= fwrite(f, a)
a = Chr(200) + Chr(0) + Chr(0) + Chr(0) + Chr(255) + Chr(127) + Chr(144) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(204) + Chr(171) + Chr(9) + Chr(1) + Chr(65) + Chr(0) + Chr(114) + Chr(0) + Chr(105) + Chr(0) + Chr(97) + Chr(0) + Chr(108) + Chr(0) + Chr(32) + Chr(0) + Chr(67) + Chr(0) + Chr(121) + Chr(0) + Chr(114) + Chr(0)
= fwrite(f, a)

* 0031 FONT2
a = Chr(49) + Chr(0)
= fwrite(f, a)
a = Chr(34) + Chr(0)
= fwrite(f, a)
a = Chr(200) + Chr(0) + Chr(0) + Chr(0) + Chr(255) + Chr(127) + Chr(144) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(204) + Chr(171) + Chr(9) + Chr(1) + Chr(65) + Chr(0) + Chr(114) + Chr(0) + Chr(105) + Chr(0) + Chr(97) + Chr(0) + Chr(108) + Chr(0) + Chr(32) + Chr(0) + Chr(67) + Chr(0) + Chr(121) + Chr(0) + Chr(114) + Chr(0)
= fwrite(f, a)

* 0031 FONT3
a = Chr(49) + Chr(0)
= fwrite(f, a)
a = Chr(34) + Chr(0)
= fwrite(f, a)
a = Chr(200) + Chr(0) + Chr(0) + Chr(0) + Chr(255) + Chr(127) + Chr(144) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(204) + Chr(171) + Chr(9) + Chr(1) + Chr(65) + Chr(0) + Chr(114) + Chr(0) + Chr(105) + Chr(0) + Chr(97) + Chr(0) + Chr(108) + Chr(0) + Chr(32) + Chr(0) + Chr(67) + Chr(0) + Chr(121) + Chr(0) + Chr(114) + Chr(0)
= fwrite(f, a)

* 0031 FONT4
a = Chr(49) + Chr(0)
= fwrite(f, a)
a = Chr(34) + Chr(0)
= fwrite(f, a)
a = Chr(200) + Chr(0) + Chr(0) + Chr(0) + Chr(255) + Chr(127) + Chr(144) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(204) + Chr(171) + Chr(9) + Chr(1) + Chr(65) + Chr(0) + Chr(114) + Chr(0) + Chr(105) + Chr(0) + Chr(97) + Chr(0) + Chr(108) + Chr(0) + Chr(32) + Chr(0) + Chr(67) + Chr(0) + Chr(121) + Chr(0) + Chr(114) + Chr(0)
= fwrite(f, a)

* 041E Format1
a = Chr(30) + Chr(4)
= fwrite(f, a)
a = Chr(63) + Chr(0)
= fwrite(f, a)
a = Chr(5) + Chr(0) + Chr(29) + Chr(0) + Chr(1) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(59) + Chr(0) + Chr(92) + Chr(0) + Chr(45) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0)
= fwrite(f, a)

* 041E Format2
a = Chr(30) + Chr(4)
= fwrite(f, a)
a = Chr(73) + Chr(0)
= fwrite(f, a)
a = Chr(6) + Chr(0) + Chr(34) + Chr(0) + Chr(1) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(59) + Chr(0) + Chr(91) + Chr(0) + Chr(82) + Chr(0) + Chr(101) + Chr(0) + Chr(100) + Chr(0) + Chr(93) + Chr(0) + Chr(92) + Chr(0) + Chr(45) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0)
= fwrite(f, a)

* 041E Format3
a = Chr(30) + Chr(4)
= fwrite(f, a)
a = Chr(75) + Chr(0)
= fwrite(f, a)
a = Chr(7) + Chr(0) + Chr(35) + Chr(0) + Chr(1) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(46) + Chr(0) + Chr(48) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(59) + Chr(0) + Chr(92) + Chr(0) + Chr(45) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(46) + Chr(0) + Chr(48) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0)
= fwrite(f, a)

* 041E Format4
a = Chr(30) + Chr(4)
= fwrite(f, a)
a = Chr(85) + Chr(0)
= fwrite(f, a)
a = Chr(8) + Chr(0) + Chr(40) + Chr(0) + Chr(1) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(46) + Chr(0) + Chr(48) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(59) + Chr(0) + Chr(91) + Chr(0) + Chr(82) + Chr(0) + Chr(101) + Chr(0) + Chr(100) + Chr(0) + Chr(93) + Chr(0) + Chr(92) + Chr(0) + Chr(45) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(46) + Chr(0) + Chr(48) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0)
= fwrite(f, a)

* 041E Format5
a = Chr(30) + Chr(4)
= fwrite(f, a)
a = Chr(131) + Chr(0)
= fwrite(f, a)
a = Chr(42) + Chr(0) + Chr(63) + Chr(0) + Chr(1) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(92) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(45) + Chr(0) + Chr(34) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(64) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0)
= fwrite(f, a)

* 041E Format6
a = Chr(30) + Chr(4)
= fwrite(f, a)
a = Chr(143) + Chr(0)
= fwrite(f, a)
a = Chr(41) + Chr(0) + Chr(69) + Chr(0) + Chr(1) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(95) + Chr(0) + Chr(51) + Chr(4) + Chr(95) + Chr(0) + Chr(64) + Chr(4) + Chr(95) + Chr(0) + Chr(61) + Chr(4) + Chr(95) + Chr(0) + Chr(46) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(92) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(95) + Chr(0) + Chr(51) + Chr(4) + Chr(95) + Chr(0) + Chr(64) + Chr(4) + Chr(95) + Chr(0) + Chr(61) + Chr(4) + Chr(95) + Chr(0) + Chr(46) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(45) + Chr(0) + Chr(34) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(95) + Chr(0) + Chr(51) + Chr(4) + Chr(95) + Chr(0) + Chr(64) + Chr(4) + Chr(95) + Chr(0) + Chr(61) + Chr(4) + Chr(95) + Chr(0) + Chr(46) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(64) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0)
= fwrite(f, a)

* 041E Format7
a = Chr(30) + Chr(4)
= fwrite(f, a)
a = Chr(147) + Chr(0)
= fwrite(f, a)
a = Chr(44) + Chr(0) + Chr(71) + Chr(0) + Chr(1) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(46) + Chr(0) + Chr(48) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(92) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(46) + Chr(0) + Chr(48) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(45) + Chr(0) + Chr(34) + Chr(0) + Chr(63) + Chr(0) + Chr(63) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(51) + Chr(4) + Chr(64) + Chr(4) + Chr(61) + Chr(4) + Chr(46) + Chr(0) + Chr(34) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(64) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0)
= fwrite(f, a)

* 041E Format8
a = Chr(30) + Chr(4)
= fwrite(f, a)
a = Chr(159) + Chr(0)
= fwrite(f, a)
a = Chr(43) + Chr(0) + Chr(77) + Chr(0) + Chr(1) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(46) + Chr(0) + Chr(48) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(95) + Chr(0) + Chr(51) + Chr(4) + Chr(95) + Chr(0) + Chr(64) + Chr(4) + Chr(95) + Chr(0) + Chr(61) + Chr(4) + Chr(95) + Chr(0) + Chr(46) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(92) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(35) + Chr(0) + Chr(44) + Chr(0) + Chr(35) + Chr(0) + Chr(35) + Chr(0) + Chr(48) + Chr(0) + Chr(46) + Chr(0) + Chr(48) + Chr(0) + Chr(48) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(95) + Chr(0) + Chr(51) + Chr(4) + Chr(95) + Chr(0) + Chr(64) + Chr(4) + Chr(95) + Chr(0) + Chr(61) + Chr(4) + Chr(95) + Chr(0) + Chr(46) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(42) + Chr(0) + Chr(32) + Chr(0) + Chr(34) + Chr(0) + Chr(45) + Chr(0) + Chr(34) + Chr(0) + Chr(63) + Chr(0) + Chr(63) + Chr(0) + Chr(92) + Chr(0) + Chr(32) + Chr(0) + Chr(95) + Chr(0) + Chr(51) + Chr(4) + Chr(95) + Chr(0) + Chr(64) + Chr(4) + Chr(95) + Chr(0) + Chr(61) + Chr(4) + Chr(95) + Chr(0) + Chr(46) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(59) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0) + Chr(64) + Chr(0) + Chr(95) + Chr(0) + Chr(45) + Chr(0)
= fwrite(f, a)

* 00E0 - XF (1)
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)

* 00E0 - XF (2-3)
for i = 1 to 2
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(244) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)
endfor

* 00E0 - XF (4-5)
for i = 1 to 2
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0) + Chr(0) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(244) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)
endfor

* 00E0 - XF (6-15)
for i = 1 to 10
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(244) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)
endfor

* 00E0 - XF (16)
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(1) + Chr(0) + Chr(32) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)

* 00E0 - XF (17)
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0) + Chr(44) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(248) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)

* 00E0 - XF (18)
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0) + Chr(42) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(248) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)

* 00E0 - XF (19)
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0) + Chr(9) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(248) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)

* 00E0 - XF (20)
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0) + Chr(43) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(248) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)

* 00E0 - XF (21)
a = Chr(224) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0) + Chr(41) + Chr(0) + Chr(245) + Chr(255) + Chr(32) + Chr(0) + Chr(0) + Chr(248) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(192) + Chr(32)
= fwrite(f, a)

* 0293 Style1
a = Chr(147) + Chr(2)
= fwrite(f, a)
a = Chr(4) + Chr(0)
= fwrite(f, a)
a = Chr(16) + Chr(128) + Chr(4) + Chr(255)
= fwrite(f, a)

* 0293 Style2
a = Chr(147) + Chr(2)
= fwrite(f, a)
a = Chr(4) + Chr(0)
= fwrite(f, a)
a = Chr(17) + Chr(128) + Chr(7) + Chr(255)
= fwrite(f, a)

* 0293 Style3
a = Chr(147) + Chr(2)
= fwrite(f, a)
a = Chr(4) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(128) + Chr(0) + Chr(255)
= fwrite(f, a)

* 0293 Style4
a = Chr(147) + Chr(2)
= fwrite(f, a)
a = Chr(4) + Chr(0)
= fwrite(f, a)
a = Chr(18) + Chr(128) + Chr(5) + Chr(255)
= fwrite(f, a)

* 0293 Style5
a = Chr(147) + Chr(2)
= fwrite(f, a)
a = Chr(4) + Chr(0)
= fwrite(f, a)
a = Chr(19) + Chr(128) + Chr(3) + Chr(255)
= fwrite(f, a)

* 0293 Style6
a = Chr(147) + Chr(2)
= fwrite(f, a)
a = Chr(4) + Chr(0)
= fwrite(f, a)
a = Chr(20) + Chr(128) + Chr(6) + Chr(255)
= fwrite(f, a)

* 0160 USESELFS
a = Chr(96) + Chr(1)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0085 BOUNDSHEET
a = Chr(133) + Chr(0)
= fwrite(f, a)
a = Chr(18) + Chr(0)
= fwrite(f, a)
*Address of List1 (first 4 byte)
List1 = fseek(f, 0, 1)
a = Chr(226) + Chr(8) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(5) + Chr(1) + Chr(27) + Chr(4) + Chr(56) + Chr(4) + Chr(65) + Chr(4) + Chr(66) + Chr(4) + Chr(49) + Chr(0)
= fwrite(f, a)

* 008C Country
a = Chr(140) + Chr(0)
= fwrite(f, a)
a = Chr(4) + Chr(0)
= fwrite(f, a)
a = Chr(7) + Chr(0) + Chr(124) + Chr(1)
= fwrite(f, a)

*unknown 01C1
a = Chr(193) + Chr(1)
= fwrite(f, a)
a = Chr(8) + Chr(0)
= fwrite(f, a)
a = Chr(193) + Chr(1) + Chr(0) + Chr(0) + Chr(34) + Chr(190) + Chr(1) + Chr(0)
= fwrite(f, a)

* 00FC SST
StartSST = fseek(f, 0, 1)
a = Chr(252) + Chr(0)
= fwrite(f, a)

ContinueSST = fseek(f, 0, 1)
a = Chr(0) + Chr(0)
= fwrite(f, a)

a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)

l = 8
k = 0
kk = Porcia

countfields = afields(fieldsinfo)

scan
for i = 1 to countfields
    * если тип поля "символьный" (и пока "дата" и "число")
    if ((fieldsinfo(i, 2) = "C") or (fieldsinfo(i, 2) = "D") or (fieldsinfo(i, 2) = "N")) and !IsBlank(b.&fieldsinfo(i, 1))
    if kk = Porcia
        = fputs(flog, "ALEN(aExtSST1) 1 = " + Str(ALEN(aExtSST1)))
        = fputs(flog, "ALEN(aExtSST2) 1 = " + Str(ALEN(aExtSST2)))
        DIMENSION aExtSST1(ALEN(aExtSST1) + 1)
        DIMENSION aExtSST2(ALEN(aExtSST2) + 1)
        = fputs(flog, "ALEN(aExtSST1) 2 = " + Str(ALEN(aExtSST1)))
        = fputs(flog, "ALEN(aExtSST2) 2 = " + Str(ALEN(aExtSST2)))
        aExtSST1(ALEN(aExtSST1)) = fseek(f, 0, 1) - StartGlobalBlock
        aExtSST2(ALEN(aExtSST2)) = fseek(f, 0, 1) - StartSST
        kk = 0
    endif
    do case
        case fieldsinfo(i, 2) = "C"
        s = ALLTRIM(b.&fieldsinfo(i, 1))
        case fieldsinfo(i, 2) = "D"
        s = DTOC(b.&fieldsinfo(i, 1))
        *s = '02/03/13'
        case fieldsinfo(i, 2) = "N"
        s = ALLTRIM(Str(b.&fieldsinfo(i, 1), 20, 3))
    endcase
    = fputs(flog, "k = " + ALLTRIM(STR(k)))
    = fputs(flog, "s(0) = " + s)
    a = In2Byte(Len(s))
    = fwrite(f, a)
    * 1 - unicode
    a = Chr(1)
    = fwrite(f, a)
    *******************
    s = ASCIItoUnicode(s)
    = fputs(flog, "s(1) = " + s)
    *******************
    = fwrite(f, s)
    l = l + LEN(s) + 3
    = fputs(flog, "LEN(s) = " + ALLTRIM(str(Len(s))))
    = fputs(flog, "l = " + ALLTRIM(STR(l)))
    ************** SST должно быть разделено максимум по 8224 байта
    * не будем отрывать заголовок от строки (3 байта). Поэтому, если закончилась строка на 8221 байте, уже начнём новую строку в новом блоке
    if (l >= sizeSST - 11) and (l <= sizeSST)
        = fputs(flog, " ============== закончился кусок SST   =================")
        *прошишем длину куска SST или SST Continue
        tmp = fseek(f, 0, 1)
        = fseek(f, ContinueSST)
        = fputs(flog, "fseek CONTINUE SST = " + ALLTRIM(STR(fseek(f, 0, 1))))
        a = In2Byte(l)
        = fwrite(f, a)
        = fseek(f, tmp)

        * 003C Continue
        a = Chr(60) + Chr(0)
        = fwrite(f, a)
        ContinueSST = fseek(f, 0, 1)
        *потом надо будет сюда вернуться, и прописать длину
        a = Chr(0) + Chr(0)
        = fwrite(f, a)
        last = l
        l = 0
    endif
   
    if l > sizeSST
        = fputs(flog, "********************** надо разрывать SST *****************")
       

        *для unicode
        = fputs(flog, "была строка: " + s)
        if mod(l - sizeSST, 2) <> 0
        = fputs(flog, "строку разрывать надо на 1 символ больше!")
        s = substr(s, Len(s) - (l - sizeSST), l - sizeSST + 1)
        = fputs(flog, "остаток строки: " + s)

        tmp = fseek(f, 0, 1)
        = fseek(f, ContinueSST)
        = fputs(flog, "fseek CONTINUE SST = " + ALLTRIM(STR(fseek(f, 0, 1))))
        a = In2Byte(sizeSST  - 1)
        = fwrite(f, a)
        = fseek(f, tmp)

        = fputs(flog, "fseek before = " + ALLTRIM(STR(fseek(f, 0, 1))))
        = fputs(flog, "l = " + ALLTRIM(STR(l)))
        = fputs(flog, "-(l - sizeSST + 1) = " + ALLTRIM(STR(-(l - sizeSST + 1))))
        = fseek(f, -(l - sizeSST + 1), 1)
        = fputs(flog, "fseek after = " + ALLTRIM(STR(fseek(f, 0, 1))))

        else
        = fputs(flog, "строку НЕ надо разрывать на 1 символ больше!")
        s = substr(s, Len(s) - (l - sizeSST) + 1, l - sizeSST)
        = fputs(flog, "остаток строки: " + s)

        tmp = fseek(f, 0, 1)
        = fseek(f, ContinueSST)
        = fputs(flog, "fseek CONTINUE SST = " + ALLTRIM(STR(fseek(f, 0, 1))))
        a = In2Byte(sizeSST)
        = fwrite(f, a)
        = fseek(f, tmp)
       
        = fputs(flog, "fseek before = " + ALLTRIM(STR(fseek(f, 0, 1))))
        = fputs(flog, "l = " + ALLTRIM(STR(l)))
        = fputs(flog, "-(l - sizeSST) = " + ALLTRIM(STR(-(l - sizeSST))))
        = fseek(f, -(l - sizeSST), 1)
        = fputs(flog, "fseek after = " + ALLTRIM(STR(fseek(f, 0, 1))))
       

        endif
       

        a = Chr(60) + Chr(0)
        = fwrite(f, a)
        ContinueSST = fseek(f, 0, 1)
        = fputs(flog, "сохраняем SST = " + ALLTRIM(STR(fseek(f, 0, 1))))
        a = Chr(0) + Chr(0)
        = fwrite(f, a)
        *байт, указывающий, что скорее всего идёт продолжение. Или, как вариант, что строка юникодовская. Надо еще выяснить.
        a = Chr(1)
        = fwrite(f, a)
        a = s
        = fwrite(f, a)
        last = l
        l = 1 + Len(s)
        *k = k - 1
        *kk = kk - 1
       
        = fputs(flog, "закончили безобразие с разывами SST")
    endif
   
    **************
    k = k + 1
    kk = kk + 1
           
    endif
endfor
endscan
*********************** пропишем последний размер SST CONTINUE (если нужно)
tmp = fseek(f, 0, 1)
= fseek(f, ContinueSST)
= fputs(flog, "последний CONTINUE SST = " + ALLTRIM(STR(fseek(f, 0, 1))))
a = In2Byte(l)
= fwrite(f, a)
= fseek(f, tmp)

*если последний блок цело закончился, то там напрописывалось лишних 4 байта
if (last >= sizeSST - 3) and (last <= sizeSST)
= fputs(flog, "лишяя сигнатура 003C и размер 0000")
= fseek(f, -4, 1)
endif

***********************
tmp = fseek(f, 0, 1)
= fseek(f, StartSST + 2 + 2)

*пропишем длину SST
*= fputs(flog, "Len SST + 8 = " + ALLTRIM(STR(l + 8)))
*a = In2Byte(l + 8)
*= fwrite(f, a)

* пропишем количество строк (без учета статистики, для облегчения программы)
a = In4Byte(k)
= fwrite(f, a)
= fwrite(f, a)
= fseek(f, tmp)

* 00FF ExtSST
a = Chr(255) + Chr(0)
= fwrite(f, a)
= fputs(flog, "ALEN(aExtSST1) - 1 = " + ALLTRIM(str(ALEN(aExtSST1) - 1)))
z = (ALEN(aExtSST1) - 1)*8 + 2
= fputs(flog, "(ALEN(aExtSST1) - 1)*8 + 2 = " + ALLTRIM(str(z)))
a = In2Byte(z)
= fwrite(f, a)

*обычно строки разделены на куски по 8 штук
a = In2Byte(Porcia)
= fwrite(f, a)

for i = 2 to ALEN(aExtSST1)
z = aExtSST1(i)
a = In4Byte(z)
= fwrite(f, a)
z = aExtSST2(i)
a = In2Byte(z)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)
endfor

* 0863 BOOKEXT
a = Chr(99) + Chr(8)
= fwrite(f, a)
a = Chr(21) + Chr(0)
= fwrite(f, a)
a = Chr(99) + Chr(8) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(21) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(2)
= fwrite(f, a)

* 000A - конец глобального блока
a = Chr(10) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

*************************************************************************************

*---------------------------- List1 --------------------------------------------*

tmp = fseek(f, 0, 1)
= fseek(f, List1)
a = In4Byte(tmp - StartGlobalBlock)
= fwrite(f, a)
= fseek(f, tmp)

*0809 - Block
a = Chr(9) + Chr(8)
= fwrite(f, a)
a = Chr(16) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(6)
= fwrite(f, a)
a = Chr(16) + Chr(0)
= fwrite(f, a)
a = Chr(136) + Chr(32)
= fwrite(f, a)
a = Chr(205) + Chr(7)
= fwrite(f, a)
a = Chr(193) + Chr(192) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(6) + Chr(3) + Chr(0) + Chr(0)
= fwrite(f, a)

*020B Index
a = Chr(11) + Chr(2)
= fwrite(f, a)
= fputs(flog, "RecCount = " + ALLTRIM(STR(RecCount())))
a = In2Byte(4*4 + 4*(Int(RecCount() / 32) + 1 - IIF(Mod(RecCount(), 32) = 0, 1, 0)))
= fputs(flog, "SizeIndex = " + ALLTRIM(STR(4*4 + 4*(Int(RecCount() / 32) + 1 - IIF(Mod(RecCount(), 32) = 0, 1, 0)))))
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = In4Byte(RecCount())
= fwrite(f, a)
DefColWidth = fseek(f, 0, 1)
*сюда будем возвращаться
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)

for i = 1 to Int(RecCount() / 32) + 1 - IIF(Mod(RecCount(), 32) = 0, 1, 0)
*сюда будет возвращаться
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
endfor

* 000D CALCMODE
a = Chr(13) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0)
= fwrite(f, a)

*000C CALCCOUNT
a = Chr(12) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(100) + Chr(0)
= fwrite(f, a)

*000F REFMODE
a = Chr(15) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0)
= fwrite(f, a)

* 0011 Iteration
a = Chr(17) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0010 DELTA
a = Chr(16) + Chr(0)
= fwrite(f, a)
a = Chr(8) + Chr(0)
= fwrite(f, a)
a = Chr(252) + Chr(169) + Chr(241) + Chr(210) + Chr(77) + Chr(98) + Chr(80) + Chr(63)
= fwrite(f, a)

* 005F SAVERCALC
a = Chr(95) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0)
= fwrite(f, a)

* 002A PRINTHEADERS
a = Chr(42) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 002B PRINTGRIDLINES
a = Chr(43) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0082 GRIDSET
a = Chr(130) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(1) + Chr(0)
= fwrite(f, a)

* 0080 GUTS
a = Chr(128) + Chr(0)
= fwrite(f, a)
a = Chr(8) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)

* 0225 DEFAULTROWHEIGHT
a = Chr(37) + Chr(2)
= fwrite(f, a)
a = Chr(4) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(255) + Chr(0)
= fwrite(f, a)

* 0081 SHEETPR
a = Chr(129) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(193) + Chr(4)
= fwrite(f, a)

* 0014 HEADER
a = Chr(20) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0015 FOOTER
a = Chr(21) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0083 HCENTER
a = Chr(131) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 0084 VCENTER
a = Chr(132) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

* 00A1 Page Setup
a = Chr(161) + Chr(0)
= fwrite(f, a)
a = Chr(34) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(255) + Chr(0) + Chr(1) + Chr(0) + Chr(1) + Chr(0) + Chr(1) + Chr(0) + Chr(4) + Chr(0) + Chr(21) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(224) + Chr(63) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(224) + Chr(63) + Chr(0) + Chr(95)
= fwrite(f, a)

* 0055 DefColWidth
a = Chr(85) + Chr(0)
= fwrite(f, a)
a = Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(8) + Chr(0)
= fwrite(f, a)

tmp = fseek(f, 0, 1)
= fseek(f, DefColWidth)
a = In4Byte(tmp - StartGlobalBlock - 6)
= fwrite(f, a)
= fseek(f, tmp)

* 0200 DIMENSION
a = Chr(0) + Chr(2)
= fwrite(f, a)
a = Chr(14) + Chr(0)
= fwrite(f, a)
a = In4Byte(0)
= fwrite(f, a)
a = In4Byte(RecCount())
= fwrite(f, a)
a = In2Byte(0)
= fwrite(f, a)
a = In2Byte(countfields)
= fwrite(f, a)
a = In2Byte(0)
= fwrite(f, a)

go top

j = 0
numberstr = 0
for i = 0 to (Int(RecCount() / 32) - IIF(Mod(RecCount(), 32) = 0, 1, 0))
=fputs(flog, "+++++++                 i = " + ALLTRIM(STR(i)) + "             +++++++++++++")
k = 0
n = 0
SecondRow = fseek(f, 0, 1) + 16 + 2 + 2
do while ((j < RecCount()) and (k < 32))
    = fputs(flog, "Row" + ALLTRIM(STR(k + 1)) + "(" + ALLTRIM(STR(j + 1)) + ")")
    *записываем ROW
    a = Chr(08) + Chr(02)
    = fwrite(f, a)
    a = Chr(16) + Chr(0)
    = fwrite(f, a)
    a = In2Byte(j)
    = fwrite(f, a)
    a = Chr(0) + Chr(0)
    = fwrite(f, a)
    a = In2Byte(countfields)
    = fwrite(f, a)
    a = Chr(255) + Chr(0)
    = fwrite(f, a)
    a = Chr(0) + Chr(0)
    = fwrite(f, a)
    a = Chr(0) + Chr(0)
    = fwrite(f, a)
    a = Chr(0) + Chr(1)
    = fwrite(f, a)
    a = Chr(15) + Chr(0)
    = fwrite(f, a)
    j = j + 1
    k = k + 1
enddo

for k = j - k to j - 1
    *первый элемент не будем использовать для оптимизации работы
    DIMENSION arrDBCELL(ALEN(arrDBCELL) + 1)
    arrDBCELL(ALEN(arrDBCELL)) = fseek(f, 0, 1) - SecondRow - n
    = fputs(flog, "DBCELL" + "(" + ALLTRIM(STR(ALEN(arrDBCELL))) + ") = " + ALLTRIM(STR(arrDBCELL(ALEN(arrDBCELL)))) + " " + ALLTRIM(STR(arrDBCELL(ALEN(arrDBCELL)))) + " ")
    n = n + arrDBCELL(ALEN(arrDBCELL))

    for l = 1 to countfields
    = fwrite(flog, "|(" + fieldsinfo(l, 2) + ") ")

    DO CASE
        * пустая ячейка
        case IsBlank(b.&fieldsinfo(l, 1))
        * 0201 - BLANK
        a = Chr(1) + Chr(2)
        =fwrite(f, a)
        a = Chr(6) + Chr(0)
        =fwrite(f, a)
        a = In2Byte(k)
        =fwrite(f, a)
        a = In2Byte(l - 1)
        =fwrite(f, a)
        a = Chr(15) + Chr(0)
        =fwrite(f, a)
        = fwrite(flog, "EMPTY")
        * C - Character   
        case (fieldsinfo(l, 2) = "C") or (fieldsinfo(l, 2) = "D") or (fieldsinfo(l, 2) = "N")
        * 00FD LABELSST
        a = Chr(253) + Chr(0)
        = fwrite(f, a)
        a = Chr(10) + Chr(0)
        = fwrite(f, a)
        a = In2Byte(k)
        = fwrite(f, a)
        a = In2Byte(l - 1)
        = fwrite(f, a)
        a = Chr(15) + Chr(0)
        = fwrite(f, a)
        a = In4Byte(numberstr)
        = fwrite(f, a)
        = fwrite(flog, ALLTRIM(STR(numberstr)))
        numberstr = numberstr + 1
        * N - Numeric
        case fieldsinfo(l, 2) = "N"
        * 0203 NUMERIC       
        a = Chr(3) + Chr(2)
        = fwrite(f, a)
        a = Chr(14) + Chr(0)
        = fwrite(f, a)
        a = In2Byte(k)
        = fwrite(f, a)
        a = In2Byte(l - 1)
        = fwrite(f, a)
        a = Chr(15) + Chr(0)
        = fwrite(f, a)
        a = str(b.&fieldsinfo(l, 1))
        = fwrite(f, Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(240) + Chr(63))
        = fwrite(flog, ALLTRIM(str(b.&fieldsinfo(l, 1), 10, 4)))
        * L - Logical
        case fieldsinfo(l, 2) = "L"   
        * 0205 BOOLERR
        a = Chr(5) + Chr(2)
        = fwrite(f, a)
        a = Chr(8) + Chr(0)
        = fwrite(f, a)
        a = In2Byte(k)
        = fwrite(f, a)
        a = In2Byte(l - 1)
        = fwrite(f, a)
        a = Chr(15) + Chr(0)
        = fwrite(f, a)
        logic = b.&fieldsinfo(l, 1)
        = fwrite(f, IIF(logic, Chr(1), Chr(0)))
        a = Chr(0)
        = fwrite(f, a)
        = fwrite(flog, IIF(logic, "TRUE", "FALSE"))
   
    ENDCASE
    = fwrite(flog, "|")
    endfor
    = fputs(flog, "")
    if !eof()
    skip
    endif
endfor
tmp = fseek(f, 0, 1)
= fseek(f, DefColWidth + 4 + i*4)
a = In4Byte(tmp - StartGlobalBlock)
= fwrite(f, a)
= fseek(f, tmp)

* 00D7 DBCELL
a = Chr(215) + Chr(0)
= fwrite(f, a)
a = In2Byte(4 + (ALEN(arrDBCELL) - 1)*2)
= fwrite(f, a)
a = In4Byte(tmp - SecondRow + 20)
= fwrite(f, a)
for m = 2 to ALEN(arrDBCELL)
    a = In2Byte(arrDBCELL(m))
    = fwrite(f, a)
endfor
= fputs(flog, "ALEN(arrDBCELL) - 1 = " + ALLTRIM(STR(ALEN(arrDBCELL) - 1)))
DIMENSION arrDBCELL(1)

endfor

* 023E Window2
a = Chr(62) + Chr(2)
= fwrite(f, a)
a = Chr(18) + Chr(0)
= fwrite(f, a)
a = Chr(182) + Chr(6) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(64) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)

* 001D SELECTION
a = Chr(29) + Chr(0)
= fwrite(f, a)
a = Chr(15) + Chr(0)
= fwrite(f, a)
a = Chr(3) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)

* 00EF PHONETICPR
a = Chr(239) + Chr(0)
= fwrite(f, a)
a = Chr(6) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(55) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)

* 000A - конец блок
a = Chr(10) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)

EndOfBook = fSeek(f, 0, 1) - StartGlobalBlock
******************** конец листа1 *************************

*выравнивание
for i = 1 to 512 - (Mod(fseek(f, 0, 1), 512) + 512*IIF(Mod(fseek(f, 0, 1), 512) = 0, 1, 0))
a = Chr(0)
= fwrite(f, a)
endfor

*for i = 1 to 128*3
* a = In4Byte(0)
* = fwrite(f, a)
*endfor

*Summary Information
SI = fseek(f, 0, 1)
a = Chr(254) + Chr(255) + Chr(0) + ;
Chr(0) + Chr(5) + Chr(1) + Chr(2) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(224) + Chr(133) + Chr(159) + Chr(242) + Chr(249) + ;
Chr(79) + Chr(104) + Chr(16) + Chr(171) + Chr(145) + Chr(8) + Chr(0) + Chr(43) + Chr(39) + Chr(179) + ;
Chr(217) + Chr(48) + Chr(0) + Chr(0) + Chr(0) + Chr(160) + Chr(0) + Chr(0) + Chr(0) + Chr(7) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(64) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(4) + Chr(0) + Chr(0) + Chr(0) + Chr(72) + Chr(0) + Chr(0) + Chr(0) + Chr(8) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(88) + Chr(0) + Chr(0) + Chr(0) + Chr(18) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(104) + Chr(0) + Chr(0) + Chr(0) + Chr(12) + Chr(0) + Chr(0) + Chr(0) + Chr(128)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(13) + Chr(0) + Chr(0) + Chr(0) + Chr(140) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(19) + Chr(0) + Chr(0) + Chr(0) + Chr(152) + Chr(0) + Chr(0) + Chr(0) + Chr(2) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(227) + Chr(4) + Chr(0) + Chr(0) + Chr(30) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(8) + Chr(0) + Chr(0) + Chr(0) + Chr(115) + Chr(101) + Chr(114) + Chr(103) + Chr(0) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(30) + Chr(0) + Chr(0) + Chr(0) + Chr(8) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(115) + Chr(101) + Chr(114) + Chr(103) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(30) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(16) + Chr(0) + Chr(0) + Chr(0) + Chr(77) + Chr(105) + Chr(99) + ;
Chr(114) + Chr(111) + Chr(115) + Chr(111) + Chr(102) + Chr(116) + Chr(32) + Chr(69) + Chr(120) + Chr(99) + ;
Chr(101) + Chr(108) + Chr(0) + Chr(64) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(173) + Chr(20) + ;
Chr(101) + Chr(46) + Chr(163) + Chr(206) + Chr(1) + Chr(64) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + ;
Chr(208) + Chr(97) + Chr(66) + Chr(183) + Chr(164) + Chr(206) + Chr(1) + Chr(3)
= fwrite(f, a)

*выравнивание
for i = 1 to 512 - (Mod(fseek(f, 0, 1), 512) + 512*IIF(Mod(fseek(f, 0, 1), 512) = 0, 1, 0))
a = Chr(0)
= fwrite(f, a)
endfor

for i = 1 to 128*7
a = In4Byte(0)
= fwrite(f, a)
endfor

*Document Summary Information
DSI = fseek(f, 0, 1)
a = Chr(254) + ;
Chr(255) + Chr(0) + Chr(0) + Chr(5) + Chr(1) + Chr(2) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(2) + Chr(213) + Chr(205) + ;
Chr(213) + Chr(156) + Chr(46) + Chr(27) + Chr(16) + Chr(147) + Chr(151) + Chr(8) + Chr(0) + Chr(43) + ;
Chr(44) + Chr(249) + Chr(174) + Chr(48) + Chr(0) + Chr(0) + Chr(0) + Chr(204) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(9) + Chr(0) + Chr(0) + Chr(0) + Chr(1) + Chr(0) + Chr(0) + Chr(0) + Chr(80) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(15) + Chr(0) + Chr(0) + Chr(0) + Chr(88) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(23) + Chr(0) + Chr(0) + Chr(0) + Chr(116) + Chr(0) + Chr(0) + Chr(0) + Chr(11) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(124) + Chr(0) + Chr(0) + Chr(0) + Chr(16) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(132) + Chr(0) + Chr(0) + Chr(0) + Chr(19) + Chr(0) + Chr(0) + Chr(0) + Chr(140) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(22) + Chr(0) + Chr(0) + Chr(0) + Chr(148) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(13) + Chr(0) + Chr(0) + Chr(0) + Chr(156) + Chr(0) + Chr(0) + Chr(0) + Chr(12) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(174) + Chr(0) + Chr(0) + Chr(0) + Chr(2) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(227) + Chr(4) + Chr(0) + Chr(0) + Chr(30) + Chr(0) + Chr(0) + Chr(0) + Chr(20) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(99) + Chr(111) + Chr(115) + Chr(109) + Chr(101) + Chr(116) + Chr(105) + ;
Chr(99) + Chr(32) + Chr(112) + Chr(97) + Chr(114) + Chr(97) + Chr(100) + Chr(105) + Chr(115) + Chr(101) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(3) + Chr(0) + Chr(0) + Chr(0) + Chr(15) + Chr(39) + Chr(11) + ;
Chr(0) + Chr(11) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(11) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(11) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + Chr(11) + Chr(0) + Chr(0) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(30) + Chr(16) + Chr(0) + Chr(0) + Chr(1) + Chr(0) + Chr(0) + ;
Chr(0) + Chr(6) + Chr(0) + Chr(0) + Chr(0) + Chr(203) + Chr(232) + Chr(241) + Chr(242) + Chr(49) + ;
Chr(0) + Chr(12) + Chr(16) + Chr(0) + Chr(0) + Chr(2) + Chr(0) + Chr(0) + Chr(0) + Chr(30) + ;
Chr(0) + Chr(0) + Chr(0) + Chr(6) + Chr(0) + Chr(0) + Chr(0) + Chr(203) + Chr(232) + Chr(241) + ;
Chr(242) + Chr(251) + Chr(0) + Chr(3) + Chr(0) + Chr(0) + Chr(0) + Chr(1)
= fwrite(f, a)

*выравнивание
for i = 1 to 512 - (Mod(fseek(f, 0, 1), 512) + 512*IIF(Mod(fseek(f, 0, 1), 512) = 0, 1, 0))
a = Chr(0)
= fwrite(f, a)
endfor

for i = 1 to 128*7
a = In4Byte(0)
= fwrite(f, a)
endfor

************************************ F A T *****************************

tmp = fseek(f, 0, 1)
*= fseek(f, FAT)
n = Int(tmp / 512) - 1
= fputs(flog, "FAT n = " + ALLTRIM(STR(n)))
*a = In4Byte(n)
*= fwrite(f, a)
*= fseek(f, tmp)

for i = 1 to n - 1
=fputs(flog, "i = " + ALLTRIM(STR(i)))
if ((i + 1)*512 <> SI) and ((i + 1)*512 <> DSI)
    a = In4Byte(i)
    =fputs(flog, "записываем сектор данных i = " + ALLTRIM(STR(i)))
else
    a = Chr(254) + Chr(255) + Chr(255) + Chr(255)
    =fputs(flog, "записываем те блоки i = " + ALLTRIM(STR(i)))
endif
= fwrite(f, a)
endfor

a = Chr(254) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)

i = tmp
k = 0
do while (i < fseek(f, 0, 1) + 4)

tmp = fseek(f, 0, 1)
= fseek(f, FAT + k*4)
n = Int(i / 512) - 1
a = In4Byte(n)
= fwrite(f, a)
= fseek(f, tmp)

k = k + 1
a = Chr(253) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)
i = i + 512

enddo

tmp = fseek(f, 0, 1)
= fseek(f, CountFAT)
a = In4Byte(k)
= fwrite(f, a)
= fseek(f, tmp)

a = Chr(254) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)

*выравнивание
for i = 1 to 512 - (Mod(fseek(f, 0, 1), 512) + 512*IIF(Mod(fseek(f, 0, 1), 512) = 0, 1, 0))
a = Chr(255)
= fwrite(f, a)
endfor

*********************** ROOT ENTRY **********************************

tmp = fseek(f, 0, 1)
= fseek(f, RDE)
a = In4Byte(Int(tmp / 512) - 1)
= fwrite(f, a)
= fseek(f, tmp)

a = Chr(82) + Chr(0) + Chr(111) + Chr(0) + Chr(111) + Chr(0) + Chr(116) + Chr(0) + Chr(32) + Chr(0) + Chr(69) + Chr(0) + Chr(110) + Chr(0) + Chr(116) + Chr(0) + Chr(114) + Chr(0) + Chr(121) + Chr(0)
= fwrite(f, a)

for i = 1 to 11
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
endfor

a = Chr(22) + Chr(0)
= fwrite(f, a)
a = Chr(5)
= fwrite(f, a)
a = Chr(1)
= fwrite(f, a)
a = Chr(255) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)
= fwrite(f, a)
a = Chr(2) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(32) + Chr(8) + Chr(2) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(192) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(70)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)
* Warning! Следующие 2 байта MS Excel при открытии может сам внести. Причём без предупреждения!!!
= fwrite(f, a)
= fwrite(f, a)
a = Chr(254) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)

******************** WORKBOOK ********************
a = Chr(87) + Chr(0) + Chr(111) + Chr(0) + Chr(114) + Chr(0) + Chr(107) + Chr(0) + Chr(98) + Chr(0) + Chr(111) + Chr(0) + Chr(111) + Chr(0) + Chr(107) + Chr(0)
= fwrite(f, a)
for i = 1 to 12
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
endfor
a = Chr(18) + Chr(0)
= fwrite(f, a)
a = Chr(2)
= fwrite(f, a)
a = Chr(1)
= fwrite(f, a)
a = Chr(255) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
*a = Chr(0) + Chr(16) + Chr(0) + Chr(0)
if EndOfBook < 4096
a = In4Byte(4096)
else
a = In4Byte(EndOfBook)
endif
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)

********************************  SUMMARY INFORMATION ********************

a = Chr(5) + Chr(0) + Chr(83) + Chr(0) + Chr(117) + Chr(0) + Chr(109) + Chr(0) + Chr(109) + Chr(0) + Chr(97) + Chr(0) + Chr(114) + Chr(0) + Chr(121) + Chr(0) + Chr(73) + Chr(0) + Chr(110) + Chr(0) + Chr(102) + Chr(0) + Chr(111) + Chr(0) + Chr(114) + Chr(0) + Chr(109) + Chr(0) + Chr(97) + Chr(0) + Chr(116) + Chr(0) + Chr(105) + Chr(0) + Chr(111) + Chr(0) + Chr(110) + Chr(0)
= fwrite(f, a)
for i = 1 to 13
a = Chr(0) + Chr(0)
= fwrite(f, a)
endfor
a = Chr(40) + Chr(0)
= fwrite(f, a)
a = Chr(2)
= fwrite(f, a)
a = Chr(1)
= fwrite(f, a)
a = Chr(1) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(3) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(255) + Chr(255) + Chr(255) + Chr(255)
= fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)

= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)
= fwrite(f, a)

= fwrite(f, a)
a = In4Byte(Int(SI / 512) - 1)
= fwrite(f, a)
a = Chr(0) + Chr(16) + Chr(0) + Chr(0)
= fwrite(f, a)
a = Chr(0) + Chr(0)
= fwrite(f, a)
= fwrite(f, a)

********************************* D o c u m e n t S u m m a r y I n f o r m a t i o n **********************

a = Chr(5) + Chr(0) + Chr(68) + Chr(0) + Chr(111) + Chr(0) + Chr(99) + Chr(0) + Chr(117) + Chr(0) + Chr(109) + Chr(0) + Chr(101) + Chr(0) + Chr(110) + Chr(0) + Chr(116) + Chr(0) + Chr(83) + Chr(0) + Chr(117) + Chr(0) + Chr(109) + Chr(0) + Chr(109) + Chr(0) + Chr(97) + Chr(0) + Chr(114) + Chr(0) + Chr(121) + Chr(0) + Chr(73) + Chr(0) + Chr(110) + Chr(0) + Chr(102) + Chr(0) + Chr(111) + Chr(0) + Chr(114) + Chr(0) + Chr(109) + Chr(0) + Chr(97) + Chr(0) + Chr(116) + Chr(0) + Chr(105) + Chr(0) + Chr(111) + Chr(0) + Chr(110) + Chr(0)
=fwrite(f, a)
for i = 1 to 5
a = Chr(0) + Chr(0)
=fwrite(f, a)
endfor
a = Chr(56) + Chr(0)
=fwrite(f, a)
a = Chr(2)
=fwrite(f, a)
a = Chr(1)
=fwrite(f, a)
a = Chr(255) + Chr(255) + Chr(255) + Chr(255)
=fwrite(f, a)
=fwrite(f, a)
=fwrite(f, a)
a = Chr(0) + Chr(0) + Chr(0) + Chr(0)
=fwrite(f, a)
=fwrite(f, a)
=fwrite(f, a)
=fwrite(f, a)
=fwrite(f, a)
=fwrite(f, a)
=fwrite(f, a)
=fwrite(f, a)
=fwrite(f, a)
a = In4Byte(Int(DSI / 512) - 1)
=fwrite(f, a)
a = Chr(0) + Chr(16) + Chr(0) + Chr(0)
=fwrite(f, a)
a = Chr(0) + Chr(0)
=fwrite(f, a)
=fwrite(f, a)

************ всё********************

= fclose(f)
= fclose(flog)

select a
use

quit

function In2Byte
parameters i
z = Chr(Mod(i, 256)) + Chr(i / 256)
return z

function In4Byte
parameters u
z = Chr(Mod(u, 256)) + Chr(Mod(u/256, 256)) + Chr(Mod(u/65536, 256)) + Chr(u/16777216)
return z

function ASCIItoUnicode
parameters s
private s1, i, t, s2, s3, s4

s2 = " ЎўЈ¤Ґс¦§Ё©Є«¬­®ЇабвгдежзийклмнопЂЃ‚ѓ„…р†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—˜™љ›њќћџ"
s3 = '012345Q6789:;<=>?@ABCDEFGHIJKLMNO' + Chr(1) + '' + Chr(26) + Chr(27) + Chr(28) + Chr(29) + Chr(30) + Chr(31) + ' !"#$%&' + "'" + '()*+,-./'
s1 = ChrTran(s, s2, s3)
s4 = ""
for i = 1 to Len(s)
    s4 = s4 + substr(s1, i, 1)
    *если была замена через ChrTran

    if AT(substr(s, i, 1), s2) <> 0
    s4 = s4 + Chr(4)
    else
    s4 = s4 + Chr(0)
    endif
endfor
return s4

802

Старина, это был тупо троллинг!

Судя по ^ этому посту, зря я это сказал http://wp2.users.photofile.ru/photo/wp2/200620914/207438973.gif

803

да ничего, не так страшна та прога, как кажется. Там как видишь кучи тупого байт-кода.

804

176 строчка - там ошибка вместо  0  нужно  5

805

DeathIsFate написал(а):

да ничего, не так страшна та прога, как кажется. Там как видишь кучи тупого байт-кода.

Всё это безумно интересно.

806

Рагуль Беззубый написал(а):

176 строчка - там ошибка вместо  0  нужно  5

реальне!  http://wp2.users.photofile.ru/photo/wp2/200620914/207438974.gif  http://wp2.users.photofile.ru/photo/wp2/200620914/207438974.gif  http://wp2.users.photofile.ru/photo/wp2/200620914/207438974.gif

807

вообще, надо бы ту прогу перевести на C++
а то этот FoxPro...  http://wp2.users.photofile.ru/photo/wp2/200620914/207438971.gif
Microsoft уже несколько лет назад официально его прикрыла.

808

DeathIsFate написал(а):
Рагуль Беззубый написал(а):

176 строчка - там ошибка вместо  0  нужно  5

реальне!  http://wp2.users.photofile.ru/photo/wp2/200620914/207438974.gif  http://wp2.users.photofile.ru/photo/wp2/200620914/207438974.gif  http://wp2.users.photofile.ru/photo/wp2/200620914/207438974.gif

это троллинг?

809

ясный пень. На 176 строчке вообще комментарий.

810

DeathIsFate написал(а):

ясный пень. На 176 строчке вообще комментарий.

Как ты это определяешь?

811

Дружище написал(а):
DeathIsFate написал(а):

ясный пень. На 176 строчке вообще комментарий.

Как ты это определяешь?

что "это"?
номер строки можно увидеть в любом текстовом редакторе. Даже в блокноте.
а комментарий начинается в FoxPro со знака *

812

Так ты всё равно не через форум это узнавал, а спецом в блокнот переносил!

813

Дружище написал(а):

Так ты всё равно не через форум это узнавал, а спецом в блокнот переносил!

а оно где у меня?

я ж не набирал весь пост с нуля.

814

http://cs14101.vk.me/c540101/v540101409/5aa8/wiRQ123yQ-I.jpg

815

ыыыыыы

816

Что означает это ваше ыы http://wp2.users.photofile.ru/photo/wp2/200620914/207438967.gif

817

В центре одни черножопые, Сухаревская закрыта. На Достоевской троллейбус проехать не может, толпа человек 600 дорогу переходит не по переходу

818

Есть такая станция что ли — Достоевская?

819

Есть. Салатовая, чуть выше кольца

820

Екарный Бабай написал(а):

В центре одни черножопые, Сухаревская закрыта. На Достоевской троллейбус проехать не может, толпа человек 600 дорогу переходит не по переходу

А Гейдар Джемаль вчера сказал у Познера, что никакой проблемы мигрантов в Москве нет и это художественный вымысел автора.

821

http://pbs.twimg.com/media/BWju4RwIAAAnkfL.jpg

822

Путин уже давно подписал указ, по которому запрещено указывать национальность, пол и т.д. в объявлениях на работу.

823

Для Джедая:

http://cs322722.vk.me/v322722290/42c4/TI2Ty21g0RM.jpg

824

http://pbs.twimg.com/media/BWm-KlSIYAA-o-b.jpg

825

^ явная постановка

826

Екарный Бабай написал(а):

Для Джедая:

http://cs322722.vk.me/v322722290/42c4/TI2Ty21g0RM.jpg

цена норм, беру)

мне бы всю тушку целиком

827

на 1.00 прикольная штука - печатная машина и планшет/смартфон в одном флаконе

828

DeathIsFate написал(а):

ясный пень. На 176 строчке вообще комментарий.

спецом строчку смотрел? Поверил, а?

829

http://ic.pics.livejournal.com/dmitriykrilov/55176084/7382/7382_600.jpg

830

в СССР было больше шансов сесть.

831

http://cs7009.vk.me/c412318/v412318520/336f/-55d8z5XlWA.jpg

Разговор Дружище с отцом.

832

FEDcom написал(а):

http://cs7009.vk.me/c412318/v412318520/336f/-55d8z5XlWA.jpg

http://wp2.users.photofile.ru/photo/wp2/200620914/207438967.gif

833

По качеству Lada сравнялись с Renault и Nissan
http://auto.mail.ru/article.html?id=43923

834

DeathIsFate написал(а):

По качеству Lada сравнялись с Renault и Nissan
http://auto.mail.ru/article.html?id=43923

Плохи у Ниссана дела, видать...

835

http://cs14101.vk.me/c540100/v540100209/d2bb/RcKeBLzRQgY.jpg

836

837

Екарный Бабай написал(а):
DeathIsFate написал(а):

По качеству Lada сравнялись с Renault и Nissan
http://auto.mail.ru/article.html?id=43923

Плохи у Ниссана дела, видать...

что-то я тоже не верю. небо и земля. у папы ниссан, мне очень нравится, а лада драндулет по сравнению с ним.

838

Иди пирог допекай, а не в машинах мужиков консультируй.

Отредактировано Дружище2 (16 Окт 2013 22:12:40)

839

чё-то ты разошёлся сёння

840

Дружище2 написал(а):

Иди пирог допекай, а не в машинах мужиков консультируй.

так ее!

841

Рагуль Беззубый написал(а):
Дружище2 написал(а):

Иди пирог допекай, а не в машинах мужиков консультируй.

так ее!

http://ratan15.users.photofile.ru/photo/ratan15/95014444/small/95466356.gif

842

Дружище нарывается на бан.

843

DeathIsFate написал(а):

Дружище нарывается на бан.

С хуя ли?

844

вот над этим вопросом и подумаешь во время бана :)

845

DeathIsFate написал(а):

вот над этим вопросом и подумаешь во время бана https://delit.nextbb.ru/img/smilies/IPB_Mini/light/smile.gif

Тока давай если банить, то надолго! Мне эти ваши короткие баны нахуй не нужны.

846

http://cs14101.vk.me/c540101/v540101409/5bbf/RSmHeIGAEEA.jpg

847

Дружище2 написал(а):
DeathIsFate написал(а):

вот над этим вопросом и подумаешь во время бана https://delit.nextbb.ru/img/smilies/IPB_Mini/light/smile.gif

Тока давай если банить, то надолго! Мне эти ваши короткие баны нахуй не нужны.

+1

848

Екарный Бабай написал(а):

http://cs14101.vk.me/c540101/v540101409/5bbf/RSmHeIGAEEA.jpg

тебе ж Дружище сказал, хватит нарушать традиции!
Всё в России хорошо! Все живут богато и счастливо!

849

и Путин настоящий гетеросексуальный мужик! Кому не нравится Путин - тот гей!

850

http://bfolder.ru/_ph/44/2/824903353.jpg


Вы здесь » DELit » О чем угодно » Ссылки и картинки (том 10)