flat assembler
Message board for the users of flat assembler.

Index > Main > [newbie] %lib% ?

Author
Thread Post new topic Reply to topic
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

a newbie question, Confused
sorry but I don't use this kind of thing in my sources.
and I'm not an expert in batch files or other things like that.

i try to compile "fresh",
but what does means "%lib%", e.g. in fresh.asm
Code:
include '%lib%/compiler/executable.inc'    

_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 20 Sep 2011, 21:06
View user's profile Send private message Send e-mail Reply with quote
nop



Joined: 01 Sep 2008
Posts: 165
Location: right here left there
nop
@ouadji hey i know this one %xxx% is a named parameter for dos batch files which dos reads from the environment so before running the batch file you set the value of %xxx% using the set command in this case set %lib% = c:\fresh\source or whatever Idea replaceable parameters are similar but can only be %1 to %9 afaik and are defined in order on the command line when the batch file is run Cool
Post 21 Sep 2011, 03:45
View user's profile Send private message Reply with quote
typedef



Joined: 25 Jul 2010
Posts: 2913
Location: 0x77760000
typedef
nop wrote:
@ouadji hey i know this one %xxx% is a named parameter for dos batch files which dos reads from the environment so before running the batch file you set the value of %xxx% using the set command in this case set %lib% = c:\fresh\source or whatever Idea replaceable parameters are similar but can only be %1 to %9 afaik and are defined in order on the command line when the batch file is run Cool


Example:
Code:
;mybat.cmd/.bat

cls
@echo off
set /p option=Choose an option(1,2): 
echo Your option is %option%
pause>nul
    


Wink
Post 21 Sep 2011, 04:46
View user's profile Send private message Reply with quote
ouadji



Joined: 24 Dec 2008
Posts: 1081
Location: Belgium
ouadji

thank you nop, thank you typedef

I suspected that was something about a batch file.
This stuff has always been a mystery for me.
Something about programming, but without mov, cmp and call ...
therefore incomprehensible ! Wink

edit
Quote:
@nop : ... in this case set %lib% = c:\fresh\source or whatever ...

it works, but without space and without "%"
Code:
;my_make.bat

set lib=..\..   ; set lib= ..\.. does not work (one space)
fasm wink.asm

;---------------------------
;wink.asm
...
;include '..\..\version.inc'
include '%lib%\version.inc'
...
    


_________________
I am not young enough to know everything (Oscar Wilde)- Image
Post 21 Sep 2011, 08:03
View user's profile Send private message Send e-mail Reply with quote
Overflowz



Joined: 03 Sep 2010
Posts: 1046
Overflowz
ouadji
also, it used to read Environment Variables ( http://en.wikipedia.org/wiki/Environment_variable )
for example:
Code:
echo %USERNAME%    

will print current username.
and so on..
Post 21 Sep 2011, 09:59
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar.

Powered by rwasa.