|
||||||
| 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 Don't hesitate to ask any questions that you have! Check out our ASCII Calculator! |
|
|||
|
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 |
| Windows XP Tricks & Tips!!!!..new ones. | pranky | Tutorials | 9 | 08-23-2008 03:22 PM |
| Project: ionFiles - Joomla Simple File Download | Jordan | Community Projects | 300 | 08-13-2008 08:36 PM |
| Issue writing to file: pointer to a class which contains pointers to other classes | Sheemer | C and C++ | 0 | 08-21-2007 01:17 AM |
| Writing to a File - Shell Script Help! | dirkfirst | General Programming | 2 | 10-03-2006 06:02 PM |
| Determine if a file is binary | Nightracer | C# Programming | 5 | 09-16-2006 02:26 PM |
| John | ........ | 223.00000 |
| dargueta | ........ | 168.00000 |
| Xav | ........ | 164.00000 |
| gaylo565 | ........ | 18.00000 |
| WingedPanther | ........ | 15.00000 |
| |pH| | ........ | 15.00000 |
| Johnnyboy | ........ | 3.00000 |
| navghost | ........ | 1.00000 |
Goal: 100,000 Posts
Complete: 66%