"Fossies" - the Fresh Open Source Software Archive

Member "highlight-3.57-x64/extras/langs-examples/_adoc/Highlight_Examples.adoc" (12 May 2020, 1649 Bytes) of package /windows/www/highlight-3.57-x64.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming AsciiDoc format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

Alan Interactive Fiction

--==============================================================================
-- "Chez Alan" by Tristano Ajmone, 2018 || Public domain: http://unlicense.org
--==============================================================================
Import 'library.i'. --> ALAN Standard Library v2.1

The my_game IsA definition_block
  Has title    "Chez Alan".
  Has subtitle "A small demo adventure".
  Has author   "Tristano Ajmone".
  Has year     2018.
  Has version  "1".
End The.

The 'IF Plaza' IsA location
  Exit north to ChezAlan.
  Description "North lies ""Chez Alan"", the renown French brasserie."
End The 'IF Plaza'.

The ChezAlan IsA room.
  Name 'Chez Alan Brasserie'.
  Description
    "Today Chez Alan seems busier then ever."
  Entered
    """Welcome back Sir!"" the maitre greets you.
    $nHe has a strong French accent."
End The ChezAlan.

The Pierre IsA male At ChezAlan.
  Name Pierre.
  Name 'Alan''s' brother.
  Is named.
  Has ex "Pierre is Alan's brother.".
End The Pierre.

Start At 'IF Plaza'.
Describe banner.
language:

Alan IF 3

langDef:

alan.lang by Tristano Ajmone

EXAPUNKS

NOTE TECH REDSHIFT DK
LINK 800
COPY 999 T
MARK BRUTEFORCE
@REP 3
SWIZ T @{3,-1} #PASS
@END
SUBI T 1 T
REPL CANARY
COPY T X ; TMP STORE T
TEST MRD ; IS XB INSIDE?
TJMP HACKED
COPY X T ; RETRIEVE T
TJMP BRUTEFORCE
MARK HACKED
VOID M ; SIGN.ALIVE
MAKE
ADDI X 1 X
NOTE STORE PASSWORD:
@REP 3
SWIZ X @{3,-1} F
@END
COPY M F ; GET RDK ID
LINK -1
HALT

MARK CANARY
LINK 800 ; DIE IF LOCKED
COPY 666 M ; SIGN.ALIVE
GRAB 199
COPY F M ; SEND RDK ID
HALT
language:

EXAPUNKS

langDef:

exapunks.lang by Tristano Ajmone

PureBasic

; ==============================================================================
;                   PureBasic 5.62 - Syntax Highlighting Test
; ==============================================================================
; by Tristano Ajmone (2018/10/04), public domain: http://unlicense.org

Declare.i CountdownDialog(text.s)

Macro IsEven(num)
  (num & 1 = 0)
EndMacro

For i=5 To 1 Step -1
  If isEven(i) : Debug Str(i) +" is even." : EndIf
  TEXT$ = "Iteration number: " + Str(i) + ~"\n\nDo you wish to continue?"
  If CountdownDialog(TEXT$) : Break : EndIf
Next

MyVar = %1011 << 1
EnableASM
INC MyVar ; Mix ASM keywords with PureBasic variable
DisableASM
Debug "MyVar: "+Str(MyVar)

Procedure.i CountdownDialog(text.s)
  UserChoice = MessageRequester("Countdown Dialog", text, #PB_MessageRequester_YesNo |
                                                          #PB_MessageRequester_Info)
  If UserChoice = #PB_MessageRequester_No
    CompilerIf #PB_Compiler_Processor = #PB_Processor_x64
      !mov rax,1
    CompilerElse
      !mov eax,1
    CompilerEndIf
  Else
    ProcedureReturn 0
  EndIf
  ProcedureReturn ; RAX/EAX will be the implicit return value
EndProcedure
language:

PureBasic

langDef:

purebasic.lang by Tristano Ajmone