Skip to content

Instantly share code, notes, and snippets.

@MarkGoldberg
MarkGoldberg / BlackBoardMG.tmTheme
Created October 29, 2013 09:51
Sublime Text Theme - With Clarion and VCSGutter Enhancements modified from http://tmtheme-editor.herokuapp.com/#/Blackboard
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- Generated by: TmTheme-Editor -->
<!-- ============================================ -->
<!-- app: http://tmtheme-editor.herokuapp.com -->
<!-- code: https://github.com/aziz/tmTheme-Editor -->
<plist version="1.0">
<dict>
<key>author</key>
<string>Domenico Carbotta</string>
@MarkGoldberg
MarkGoldberg / gist:7675892
Created November 27, 2013 13:43
ViewManager.Next (Clarion ABC) refactoring for clarity This helps explain return values from .ValidateRecord() ViewManager.Next is One Method from ABBrowse.clw
ViewManager.Next PROCEDURE
CODE
LOOP
NEXT(SELF.View)
CASE ERRORCODE()
OF NoError ; CASE SELF.ValidateRecord()
OF Record:OK ; RETURN Level:Benign
OF Record:OutOfRange; RETURN Level:Notify
! OF Record:Filtered ; do nothing loop around for the NEXT()
END
@MarkGoldberg
MarkGoldberg / FileVersion.clw
Last active January 4, 2016 04:29
FileVersion, Clarion Program - submitted by Olivier Cretey
Program
!Pragma('link(version.lib)')
!Pragma('link(GetVersion.Version)')
_VS_FIXEDFILEINFO Group, Type
dwSignature Long
dwStrucVersion Long
dwFileVersionMS Long
dwFileVersionLS Long
@MarkGoldberg
MarkGoldberg / TestThreads.clw
Created January 23, 2014 15:14
Clarion Tightloop ThreadTest
PROGRAM
OMIT('***')
* Created with Clarion 9.0
* User: Mark.Live
* Date: 1/23/2014
* Time: 10:05 AM
*
* To change this template use Tools | Options | Coding | Edit Standard Headers.
@MarkGoldberg
MarkGoldberg / StringQueue.clw
Created February 7, 2014 11:10
Clarion Get(Q, CompareFunction)
PROGRAM
MAP
END
INCLUDE('ctGenericQ.inc'),ONCE
gtStrRef GROUP,TYPE
Str &STRING
END
gtStrVal GROUP(gtStrRef),TYPE
@MarkGoldberg
MarkGoldberg / SWP_HWND.equ
Last active August 29, 2015 13:56
Clarion Equates for SWP_ and HWND_ Z Order
OMIT('*** IFDEF ***', SWP_NOSIZE)
SWP_NOSIZE equate(0001h)
SWP_NOMOVE equate(0002h)
SWP_NOZORDER equate(0004h)
SWP_NOREDRAW equate(0008h)
SWP_NOACTIVATE equate(0010h)
SWP_FRAMECHANGED equate(0020h) !The frame changed: send WM_NCCALCSIZE
SWP_SHOWWINDOW equate(0040h)
SWP_HIDEWINDOW equate(0080h)
@MarkGoldberg
MarkGoldberg / ErrorLevels.EQU
Last active August 29, 2015 13:56
Clarion For Windows - class that uses REGISTER - in this case for EVENT:Notify
OMIT('+++ equates already exist',LEVEL:User)
! INCLUDE('ABERROR.INC')
! Severity of error
Level:Benign EQUATE(0) !Register(): Calls any other handlers and the ACCEPT loop, if available.
Level:User EQUATE(1)
Level:Program EQUATE(2)
Level:Fatal EQUATE(3) !Register(): Doesn't call other handlers or the ACCEPT loop. This is like executing BREAK when processing the event in an ACCEPT loop.
Level:Cancel EQUATE(4)
Level:Notify EQUATE(5) !Register(): Doesn't call other handlers or the ACCEPT loop. This is like executing CYCLE when processing the event in an ACCEPT loop.
!end-OMIT('+++ equates already exist',LEVEL:User)
@MarkGoldberg
MarkGoldberg / PictureNotation.txt
Last active February 12, 2019 15:32
Clarion - Proposed Picture Notation for Hex,Octal and Binary
It would be great to extend the picture notations to Support Hex, Binary and Octal Notations.
Ideally these new pictures would be available for use in the RTL and Topscan
The following specification is intended to match the current Language Reference for @N pictures
-----------------------------------------------------------------------------------------------
@[B|b|O|o|H|h] [currency] [sign] [fill] size [grouping] [places] [sign] [currency] [B]
Base
@[N|n] = Decimal - status quo, will not alter (see existing doc for @N)
@MarkGoldberg
MarkGoldberg / CollapseControls.clw
Last active August 29, 2015 13:56
Clarion - Collapse Controls
qtFEQs QUEUE,TYPE
FEQ SIGNED
END
gtXYWH GROUP,TYPE
X LONG
Y LONG
W LONG
H LONG
END
@MarkGoldberg
MarkGoldberg / _ver_.inc
Created March 11, 2014 14:57
_ver_.inc -- Clarion Include file (used by Debuger class)
omit('***VER IS SET**',_IFDEF_VER_)
_IFDEF_VER_ EQUATE(1)
compile('**',_C73_)
!also applies to _C80_
_Ver_ EQUATE('LA')
! '**'
omit('**C73**',_C73_)
compile('**',_C70_)
_Ver_ EQUATE('70')
! '**'