Files
harbour-core/harbour/website/samples/longdev.prg.html
Viktor Szakats 31a85b650e 2013-02-28 17:19 UTC+0100 Viktor Szakats (harbour syenar.net)
* utils/hbmk2/hbmk2.*.po
  * utils/hbmk2/hbmk2.prg
    % minor optimization to recent patch
    + cleanups in some help items
    + '-?' and '-h' options are now accepted as '-help'
    + '-??' and '-hh' options are now accepted as '-longhelp'
    - deleted '-license' option, it's now part of '-longhelp'
    ! hbshell_gtSelect() parameter fixed to be case insentitive
      in an internal check

  + tests/clipper.ch
    + added header file that translates certain Harbour
      specific functions to ones understood by Clipper.
      Useful to compile lightly Harbour specific code
      in Clipper (or other Clipper compatible language),
      for comparison.

  * tests/*.prg
  - tests/exthrb.prg
  + tests/hrbext.prg
  * website/samples/*.prg.html
    ! various cleanups, minor fixes, formatting
    + #included "clipper.ch" to enable running what's
      possible to run with Clipper

  * src/rtl/gtwin/gtwin.c
  * src/rtl/gtwvt/gtwvt.c
    ! return string type for hb_gtInfo( HB_GTI_FONTSEL )
      in sync with GTXWC

  * contrib/xhb/xhbfunc.c
  * include/hbdefs.h
    * HB_FUNC_EXEC() macro value to not end with ';',
      now it should be added on usage (almost all usages
      were such already). To be code formatter friendly.

  * contrib/xhb/xhb.hbp
  + contrib/xhb/xhbdepr.prg
    + added compatiblity stubs for functions deprecated from
      Harbour core, but still available in xHarbour. (xHarbour
      has yet to deprecate anything)
      So here we can gather stuff that's deprecated from Harbour
      core (except internal functions - most of them named '__*' -,
      and the "evil" ones)
    ; NOTE: Runtime efficiency is not a goal with these stubs,
            only "cheap" long term maintainability.

  - contrib/hbblat/tests/blattest.prg
  + contrib/hbblat/tests/test.prg
  * extras/guestbk/guestbk.hbp
  - extras/guestbk/testcgi.prg
  + extras/guestbk/cgi.prg
    * renames

  * src/vm/dynsym.c
  * contrib/hbfbird/tests/testapi.c
  * contrib/xhb/thtm.prg
    * minor
2013-02-28 16:25:51 +00:00

61 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8">
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/xregexp-min.js"></script>
<script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/xregexp/2.0.0/backcompat.js"></script>
<script type="text/javascript" src="/js/shCore.js"></script>
<script type="text/javascript" src="/js/shBrushHarbour.js"></script>
<link href="/css/shCore.css" rel="stylesheet" type="text/css" />
<link href="/css/shThemeDefault.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">SyntaxHighlighter.all()</script>
</head>
<body>
<script type="syntaxhighlighter" class="brush: harbour; light: true"><![CDATA[
// Testing Harbour long string handling with device output
/* Harbour Project source code
http://harbour-project.org/
Donated to the public domain on 2001-03-08 by David G. Holm <dholm jsd-llc com>
*/
PROCEDURE Main()
LOCAL cShort := "1234567890"
LOCAL i, cLong, cBuffer, nHandle
// Create an 80 KB string (Clipper is limited to 64 KB).
cLong := cShort
FOR i := 1 TO 13
cLong += cLong
NEXT
// Write the long string to file long_str.prn
SET PRINTER TO long_str
SET DEVICE TO PRINTER
DevOut( cLong )
SET PRINTER OFF
SET DEVICE TO SCREEN
// Confirm the string length and that a copy is exactly identical.
? "The length of the long string is", iif( Len( cLong ) == 80 * 1024, "correct", "wrong" )
cBuffer := cLong
? "The length of a copy of the long string is", iif( Len( cLong ) == 80 * 1024, "correct", "wrong" )
? "The copy of the long string is", iif( cLong == cBuffer, "equal", "not equal" ), "to the long string"
// Read the string back in and compare it to the original.
nHandle := FOpen( "long_str.prn" )
cBuffer := FReadStr( nHandle, 90000 )
? "Original:", Len( cLong )
? "From file:", Len( cBuffer )
? "The strings are", iif( cLong == cBuffer, "equal", "not equal" )
RETURN
]]></script>
</body>
</html>