--------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100189 Date: 05/22/98 From: GLEN SHELTON Time: 06:16pm \/To: MARK LEWIS (Read 0 times) Subj: Julian date... Hello mark! Friday May 22 1998 11:41, mark lewis wrote to Glen Shelton: GS>>>> I'm working on a project where I need to get the Julian date GS>>>> for the current year. Something like today would be 139. GS>>>> I'm new to pascal and not sure where to start. Any help would GS>>>> be appreciated. Thanks in advane. SH>>> This is a problem that you have to work out in real life first. SH>>> For instance, in real life, you'd count the number of days up SH>>> until this day. Or, to make it simpler, you'd add the number of SH>>> days in all the previous months, then add the number of days SH>>> into the current month. GS>> I knew it was simple, duh. :) Thanks, I figured out the code GS>> for what I needed to do, after reading your message... :) ml> you need to also make sure that you take into account leapyears and ml> february gaining a day during those years... Yep, I kind of figured that out after looking at some other code that was similiar to what I needed to do... I need to do some more testing on it. to make sure it does that. Thanks for the info. Glen --- GEcho 1.11+ * Origin: The Last Star Fighter * (1:130/503) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100190 Date: 05/22/98 From: GLEN SHELTON Time: 06:17pm \/To: JOHAN ZWIEKHORST (Read 0 times) Subj: Julian date... Hello Johan! Thursday May 21 1998 09:43, Johan Zwiekhorst wrote to Glen Shelton: >> GS: I'm working on a project where I need to get the Julian date for the >> GS: current year. Something like today would be 139. I'm new to pascal >> GS: and not sure where to start. Any help would be appreciated. Thanks >> GS: in advane. JZ> Below is what I use myself. If more programmers had done this kind of JZ> programming, we wouldn't have a Y2K problem now. Saving valuable memory JZ> and disk space never was a good argument. A string like DDMMYY or DD/MM/YY JZ> will take 6 or 8 bytes while creating a millenium problem, while a JDN JZ> will fit in 4 bytes (taking up less room!) and will only create a roblem JZ> in several tenthousand years or so. < lot of stuff deleted > JZ> There are a couple of string functions in there that are part of the ame JZ> unit JZLIB, but their meaning should be clear. If you want to know more, JZ> just ask. Thanks, I'll take a closer look over the weekend. Glen --- GEcho 1.11+ * Origin: The Last Star Fighter * (1:130/503) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100191 Date: 05/23/98 From: GLEN SHELTON Time: 09:39pm \/To: MIKE COPELAND (Read 0 times) Subj: Julian date... Hello Mike! Friday May 22 1998 11:24, Mike Copeland wrote to Glen Shelton: GS>> I'm working on a project where I need to get the Julian date for the GS>> current year. Something like today would be 139. I'm new to pascal GS>> and not sure where to start. Any help would be appreciated. Thanks GS>> in advane. MC> "139" wouldn't be a "Julian date", since the range of computed dates MC> are in the range of 10's of thousands - today is somewhere like 39,000. MC> What you're referring to here is likely an _ordinal_ date - the 139th MC> day of this year. That's fairly simple to compute (using the day of the MC> month and adding the # of days in preceding months), but it's a very MC> short-sighted "date" form - especially with 2000 (Y2K) approaching. To MC> use an ordinal date (in comparisons), you need to prepend the year to MC> the value (it's traditionally been the last 2 digits of the year - e.g. MC> 98), so today would be 98139, etc. Clearly, this is where the Y2K MC> problem manifests itself (in about 18 month), so a better type of data MC> is needed - a true Julian Data is good. MC> The problem is that a true Julian Date formula is fairly complicated MC> - and there are several variations, based on what's used for the "base". MC> Some feel that Julius Caesar's birthday is a valid base, others think MC> Christ. etc. The point is, you should think out what use(s) you have MC> for this "date processing" and research the appropriate solution. You're right, that is what I'm looking for, but being new to pascal, I'm still learning... Thanks for the info... Glen --- GEcho 1.11+ * Origin: The Last Star Fighter * (1:130/503) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100192 Date: 05/23/98 From: GLEN SHELTON Time: 09:43pm \/To: JASEN BETTS (Read 0 times) Subj: Julian date... Hello Jasen! Friday May 22 1998 18:08, Jasen Betts wrote to GLEN SHELTON: GS>> I'm working on a project where I need to get the Julian date for the GS>> current year. Something like today would be 139. I'm new to pascal GS>> and not sure where to start. Any help would be appreciated. Thanks in GS>> advane. JB> Make an array of the lengths of all the months, from there on you JB> shouldn't have any trouble. :) Trouble? What trouble? :) Yep, needed that also, after looking at some others work, and picking a few brains in here, I pretty much have the code I needed... Thanks for the info... Glen --- GEcho 1.11+ * Origin: The Last Star Fighter * (1:130/503) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100193 Date: 05/24/98 From: STEWART HONSBERGER Time: 02:27am \/To: ALL (Read 0 times) Subj: Structs Hello all, I'm trying to convert some structures, and need some help. If I have a record like so; type Sample = Record Value1: Byte; String1: String; Value2: Word; String2: String end; and I wanted to add one more element to the end of it, but the element must be a case reliant on Value1. For instance, if Value1 = 1 then the element should be V1, if Value1 = 2 then the element should be V2. From what I understand, this is what I'm looking for, but it says Case *INTEGER* of. When I tried 'Case Value1 of' I got an error. stamp_combo=Record Case Integer Of 0:(ldate:Longint); 1:(msg_st:_Stamp); 2:(dos_st:_Dos_St); end; Stewart Honsberger, blackdeath@tinys.oix.com ... PASCAL programmers are blind - they do not C! -!- GOPGP v1.11 --- Squish/386 v1.11 * Origin: Blackdeath BBS - Private (1:229/604) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100194 Date: 05/24/98 From: ALEXEY BROUSHKOVSKY Time: 01:25am \/To: TIMOTHY MONNIG (Read 0 times) Subj: de-compilers Good morning/day/evening/night, Timothy Monnig! 23 May 98 05:44, Timothy Monnig writes to all: TM> where can i get some de-compilers? Note: Programs, which are written in Pascal (TP/BP) cannot be decompiled back to 100% Pascal source because of code optimization :( (same as C) You need for some dizassembler. .ո\/ڿ AKA Gloom |/\ --- ૠ... * Origin: Did You leave the room? (2:4621/22.10) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100195 Date: 05/23/98 From: DAVID NOON Time: 06:54pm \/To: PAUL WALKER (Read 0 times) Subj: Pchar Stuff In a message dated 05-21-98, Paul Walker said to David Noon about Pchar Stuff Hi Paul, PW>You're back! Get thee into PGMRS and PGMRS_UK this minute. :) I think Pascal source code causes the moderator of those echoes some "digestive embarrassment". Simon likes: i) programs with bugs in them; ii) programs written in C. [see option i] So, when I've some Pascal source to post, I'll place it here. ... :-) Regards Dave ___ * MR/2 2.25 #353 * Thank heaven for little girls, thank silicone for the bigger ones --- Maximus/2 3.01 * Origin: DoNoR/2,Woking UK (44-1483-717905) (2:440/4) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100196 Date: 05/22/98 From: VISA HARVEY Time: 09:12pm \/To: PAUL WALKER (Read 0 times) Subj: Pascal Compiler for Atari ST Hello Paul! Thursday May 21 1998 01:02, Paul Walker wrote to Visa Harvey: VH>> procedure putscr (var scr : scrtype); PW> [snip] VH>> there? happy now :) and yes it does work, i just tested it. PW> That's fine, thanks. ;) PW> [Although to be a pendant, that shouldn't really be a var above..) jeez ;) ok so it slipped in ( I copy&pasted the getscr & edited it in about 0 secs flat Visa --- * Origin: ABSTRACT Software-you know who to trust,and it's not 2:254/211.24) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100197 Date: 05/24/98 From: JUD MCCRANIE Time: 07:07pm \/To: ALL (Read 0 times) Subj: BORLAND -> INPRISE I'm posting this because it pertains to Borland.. ************************************************ The following is a letter from Del Yocam, Inprise CEO, regarding the announcement of Borland's name change to Inprise Corporation. ************************************************ Dear Valued Customers: As many of you have already heard through industry news, Borland announced a name change on April 29, 1998. We are now Inprise Corporation, dedicated to the radical simplification of enterprise computing. I'd like to take a moment now to give you a little background on what led us to it. First and foremost, we are a different company than we were just eighteen months ago when I joined Borland as CEO. Several key events in the previous five quarters of our turnaround strategy substantiate this: - Our recognition of the next wave of enterprise application development, deployment, and management based on distributed object computing. - Our focus on the radical simplification of the development, deployment, and management of distributed enterprise applications. - The execution of our Information Network strategy to help hundreds of enterprise customers develop and implement sophisticated Information Network distributed applications that provide a competitive advantage including T. Rowe Price, Daiwa Securities, Charles Schwab, Sprint, and Ericsson. - Our growing professional services partnerships with leading System Integrators such as Arthur Andersen, Cambridge Technology Partners, Compuware, EDS, Ernst & Young, Grant Thornton, KPMG, and SHL Systemhouse. - Our strong business relationships with Enterprise IT suppliers such as IBM, SAP, Sun, Oracle, Hitachi, Netscape, Novell, and Microsoft. - Our integration of Visigenic Software, Inc., acquired on February 27, 1998, helping us to accelerate the realization of our vision and increase our focus on the enterprise. - Our growth and profitability in rapidly expanding enterprise distributed computing markets. In recognition of our new strategy and direction, today we announce that Borland becomes INPRISE CORPORATION. INPRISE integrates the enterprise by radically simplifying distributed computing. Our development technology allows organizations to provide any information to any user, anytime, anywhere. Major corporations worldwide use INPRISE's products and services to simplify the development, deployment, and management of distributed enterprise applications, giving them a significant competitive advantage. Over the next few months, INPRISE will announce a series of products that will further accelerate our growth in the enterprise market. The cornerstone will be our INPRISE Application Server technology that will radically simplify distributed enterprise development, deployment, and management. The combination of this scalable Application Server technology with our high-productivity component-based development environments, our adherence to open, industry standards, and our strong industry partnerships provides a clear roadmap for INPRISE's ongoing growth. At the same time, we will continue to support the individual developer by continuing to enhance the Borland development products that our customers have come to rely on. It is the combination of our long heritage of easy to use, world-class development environments with the strength of industry-leading object component technology that is key to our strategy. Today, we are the only company in the marketplace to combine world-class development tools with industry-leading object middleware and application management facilities allowing customers to fully exploit the benefits of distributed object computing. We invite you to share in our vision. You'll find that INPRISE is one of the most exciting, viable, and forward-looking companies that provides the technology and services to radically simplify the development, deployment, and management of enterprise applications. Sincerely, Delbert W. Yocam CEO and Chairman of the Board Jud McCranie * Silver Xpress V4.3 SW20178 --- PCBoard (R) v15.3/M 5 * Origin: Riverdale, Ga (1:133/9024) --------------- FIDO MESSAGE AREA==> TOPIC: 107 PASCAL Ref: FA100198 Date: 05/23/98 From: RICHARD RJFORS Time: 06:39pm \/To: ALL (Read 0 times) Subj: vrtual pascal and fullscreen gfx Hi All. I have played around with this (taken from flame.pas): ============== program gfx; uses Os2Base, Use32; {$PMTYPE NOVIO} {$IFDEF DYNAMIC_VERSION} {$Dynamic System} {$L VPRTL.LIB} {$ENDIF} type Ptr16Rec = record Ofs,Sel: SmallWord; end; var RGBValues: array [1..128] of record R,G,B: Byte; end; OrgMode: VioModeInfo; VioBufOfs: Longint; C,X,Y,Z: Word; Status: Byte; { BIOS Video Mode #13 } const VioMode: VioModeInfo = ( cb: SizeOf(VioModeInfo); fbType: vgmt_Other + vgmt_Graphics; Color: colors_256; Col: 40; Row: 25; HRes: 320; VRes: 200 ); ColorRegs: VioColorReg = ( cb: SizeOf(VioColorReg); rType: 3; { Color registers } FirstColorReg: 1; NumColorRegs: 128; ColorRegAddr: @RGBValues ); VioBuf: VioPhysBuf = ( pBuf: Ptr($A0000); cb: 64*1024 ); const Locked: Boolean = False; { Restores screen to the original state } procedure RestoreScreen; begin VioSetMode(OrgMode, 0); if Locked then VioScrUnLock(0); end; { Prepares R,G and B values for color register # No } procedure SetRGB(No,AR,AG,AB: Byte); begin with RGBValues[No] do begin R := AR; G := AG; B := AB; end; end; begin for X := 1 to 32 do begin SetRGB(X , X*2-1, 0 , 0 ); SetRGB(X + 32, 63 , X*2-1, 0 ); SetRGB(X + 64, 63 , 63 , X*2-1); SetRGB(X + 96, 63 , 63 , 63 ); end; { Save original video mode } OrgMode.cb := SizeOf(VioModeInfo); VioGetMode(OrgMode, 0); { Set VGA 320x200x256 video mode } if VioSetMode(VioMode, 0) <> 0 then Halt; { Convert flat pointer to 16:16 form that is used by Vio } FlatToSel(ColorRegs.ColorRegAddr); { Modify color registers with values prepared above } if VioSetState(ColorRegs, 0) <> 0 then Halt; { Lock the screen } if (VioScrLock(lockIO_NoWait, Status, 0) <> 0) or (Status <> lock_Success) then Halt; Locked := True; { Get selector for physical video buffer } if VioGetPhysBuf(VioBuf, 0) <> 0 then Halt; { Make flat pointer that points to the physical video buffer} Ptr16Rec(VioBufOfs).Ofs := 0; Ptr16Rec(VioBufOfs).Sel := VioBuf.Sel; SelToFlat(Pointer(VioBufOfs)); { Clear the screen. Unlike function 0 of the BIOS INT 10h } { VioSetMode doesn't clear the screen. } FillChar(Pointer(VioBufOfs)^,64*1024,0); RestoreScreen; end. ============== Fillchar works perfectly, but I tried to with the move command. I hade an array of bytes that I tried to copy but it didn't work. Any Idea? And how to I change the palette in the program? /Richard * Origin: jo (2:203/631.19) --- FleetStreet 1.22+ --- Squish/386 v1.11 * Origin: Richards point (2:203/631.19)