Re: Syntax
By: DesotoFireflite to All on Mon Mar 07 2022 08:41 am
> I want to be able to add to the top of a file, but I can only find out how to
> add to the bottom of a file. Currently I am using:
> fopen file 0_CREAT|0_WRONLY|O_APPEND "C:\SBBS\XTRN\INFO\INFO.LST"
> and that appends to the bottom of the list, but I want to show the newest to
> oldest, not oldest to newest.
> I'm assuming I just leave off the O_APPEND, but is there a correct way.
i probably could have done this like 15 or more years ago with baja, but I can't
process the way to do it now.
what i would do (which requires no brain power) is to cat your new line to a new
file, then cat your current list to that file, then move that file over your
info.lst
or if your list file has a date or something sortable, you could just sort the
file.
---
■ Synchronet ■ ::: BBSES.info - free BBS services :::
|