|
||||||
| Pascal/Delphi Forum for discussing Borland Delphi and Pascal coding techniques, tips and tricks. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||
|
Ok I have only recently started with delphi and kind of got thrown in at the deep end so to speak.
I have a blank binary file that needs strings and booleans input from several lists in .txt files at a repetative address. I am not sure how to do this. For example say the values in the namelist.txt were: Code:
Paul Michael Andrew Stacy Code:
045061756C00000000000000000000000000000000000000000000000000000000000000 074D69636861656C00000000000000000000000000000000000000000000000000000000 06416E647265770000000000000000000000000000000000000000000000000000000000 055374616379000000000000000000000000000000000000000000000000000000000000 Would appreciate it if someone could help me do this. Thanks a lot |
| Sponsored Links |
|
|
|
|||
|
All I can come up with is this, it allows me to write Hello every 8 bytes
Code:
var binString1, myString2: shortString; binFile : File of string[8]; begin AssignFile(binFile, 'Test.bin'); ReWrite(binFile); binString1 := 'Hello'; binString2 := 'Hello'; Write(binFile, binString1, binString2); CloseFile(binFile); end; Thanks |
|
|||||
|
That was fast, what was your solution?
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog The CodeCall Wiki is now fully integrated with vBulletin users! Check it out and add some new pages! |
|
|||
|
It was under my nose the whole time, I just didnt realise it was compatable with binary and strings. I used TMemoryStream, which allowed me to adjust the position and then saved the memory stream to a file.
|
| Sponsored Links |
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Project: ionFiles - Joomla Simple File Download | Jordan | Community Projects | 331 | 11-26-2008 12:35 PM |
| Windows XP Tricks & Tips!!!!..new ones. | pranky | Tutorials | 9 | 08-23-2008 04:22 PM |
| Issue writing to file: pointer to a class which contains pointers to other classes | Sheemer | C and C++ | 0 | 08-21-2007 02:17 AM |
| Writing to a File - Shell Script Help! | dirkfirst | General Programming | 2 | 10-03-2006 07:02 PM |
| Determine if a file is binary | Nightracer | C# Programming | 5 | 09-16-2006 03:26 PM |
| WingedPanther | ........ | 2753.6 |
| Xav | ........ | 2704 |
| Brandon W | ........ | 1702.32 |
| John | ........ | 1207.73 |
| marwex89 | ........ | 1175.24 |
| morefood2001 | ........ | 966.05 |
| dcs | ........ | 655.75 |
| Steve.L | ........ | 475.59 |
| orjan | ........ | 418.58 |
| Aereshaa | ........ | 383.54 |