Search found 941 matches
- 28 May 2023 09:28
- Forum: DOS Batch Forum
- Topic: How to clear an array?
- Replies: 9
- Views: 5203
Re: How to clear an array?
I don't think there is a method, at least you can do a "setlocal" before defining the variables. With an "endlocal" you clear them up.
- 28 May 2023 03:10
- Forum: DOS Batch Forum
- Topic: Dos Batch Math Library
- Replies: 69
- Views: 99409
Re: Dos Batch Math Library
Hi Antonio, I have found a method that use the max or min between +1/-1 and x ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: @echo off setlocal EnableDelayedExpansion :: Define simple macros to support JavaScript within batch set "beginJS=mshta "javascript:code(close...
- 23 May 2023 01:56
- Forum: DOS Batch Forum
- Topic: Dos Batch Math Library
- Replies: 69
- Views: 99409
Re: Dos Batch Math Library
I recently developed the atan(x) function with two decimal places after the decimal point. It's pretty accurate but I have a problem. In the calculation I had to set a division. ( 1/x ) or (10000000/x). Obviously when x=0 an exception is thrown and the value is not assigned. I wanted to know if it's...
- 20 May 2023 11:12
- Forum: DOS Batch Forum
- Topic: Event-driven multi-thread scheme for Batch files
- Replies: 16
- Views: 24061
Re: Event-driven multi-thread scheme for Batch files
@aacini
What is the "2>&1 1>&3" trick?
What is the "2>&1 1>&3" trick?
- 17 May 2023 10:40
- Forum: DOS Batch Forum
- Topic: DosBatch 3D Engine.
- Replies: 36
- Views: 35066
Re: DosBatch 3D Engine.
This is the version 0.1.3.
I rewrote most of the code to make the sphere even faster and more dynamic.
Now the speed is independent from the pc speed and the resolution is dynamic in two directions.
I rewrote most of the code to make the sphere even faster and more dynamic.
Now the speed is independent from the pc speed and the resolution is dynamic in two directions.
- 16 May 2023 11:19
- Forum: DOS Batch Forum
- Topic: create macro: Let's create a small handout with reports .
- Replies: 17
- Views: 5349
Re: create macro: Let's create a small handout with reports .
thanks jeb, I didn't answer right away because I couldn't enter the forum
- 06 May 2023 02:17
- Forum: DOS Batch Forum
- Topic: create macro: Let's create a small handout with reports .
- Replies: 17
- Views: 5349
Re: create macro: Let's create a small handout with reports .
@jeb Thanks for the links, I'm looking at them. But I wanted to ask you a question. What is your method that you use and have you used to discover the various ways to create macros. An example is enough for me. Then I wanted to ask you why when there are quotation marks you need two ^ carets. Also w...
- 04 May 2023 11:28
- Forum: DOS Batch Forum
- Topic: create macro: Let's create a small handout with reports .
- Replies: 17
- Views: 5349
Re: create macro: Let's create a small handout with reports .
Learn about macros? You can read the several posts here about this topic, modify the examples in order to understand how such a feature work and then, when you find a specific point you have problems with, post your non-working code, specify what you want and the problem you have. I think that in t...
- 04 May 2023 04:21
- Forum: DOS Batch Forum
- Topic: create macro: Let's create a small handout with reports .
- Replies: 17
- Views: 5349
Re: create macro: Let's create a small handout with reports .
Thanks T3rry but I don't understand the rules. I did a test with only two escape characters "^^" before the exclamation mark "!" and gives me the same result.So you need 3 or 2 when in double quote ' " ' ? this seems to work: @echo off setlocal EnabledelayedExpansion set Char=A set Accumulator=B ( r...
- 03 May 2023 09:30
- Forum: DOS Batch Forum
- Topic: create macro: Let's create a small handout with reports .
- Replies: 17
- Views: 5349
Re: create macro: Let's create a small handout with reports .
Hi Antonio, Yes you are right it's very theoretical and impractical, but is an extract of the code. Now I will try to explain myself better. This is the code that I have to optimize summarized to the bone. And the problem I face is writing macros. I'm no expert in writing code that needs to be treat...
- 02 May 2023 14:14
- Forum: DOS Batch Forum
- Topic: create macro: Let's create a small handout with reports .
- Replies: 17
- Views: 5349
Re: create macro: Let's create a small handout with reports .
Thanks T3rry , you put many interesting things, I'm reading calmly because 'I have to digest a lot. The trick of the objects you put at the beginning is really cool. 8) I'll see if among the things you mentioned I find something that fits my work. But for the moment I expand my example to include ma...
- 02 May 2023 08:02
- Forum: DOS Batch Forum
- Topic: create macro: Let's create a small handout with reports .
- Replies: 17
- Views: 5349
Re: create macro: Let's create a small handout with reports .
For arithmetic macro's, it's rather practical to define an array of sums that can be indexed using one or more "key" variables, expanding the relevant macro using the current value of the given "key" String/s expanded using a for /f string loop if needed. Think of it as using lookup values to enact...
- 02 May 2023 06:20
- Forum: DOS Batch Forum
- Topic: create macro: Let's create a small handout with reports .
- Replies: 17
- Views: 5349
create macro: Let's create a small handout with reports .
I'm going crazy creating macros and I ask you for help starting from simple examples. If you have links that summarize I would like to know them. I searched the forum and came across threads that always took for granted something that was too big for my mental capacity. I need to optimize a script t...
- 01 May 2023 02:43
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 52810
Re: 256 colors in virtual terminal escape sequence
Now the colors that are not optimal are less. I stop here because I'm bored to continue. I would have an idea to implement it this way: if the distance between the two colors chosen for ditering is higher than a certain threshold then choose only the first color (which is certainly closer). But I'll...
- 30 Apr 2023 15:14
- Forum: DOS Batch Forum
- Topic: 256 colors in virtual terminal escape sequence
- Replies: 41
- Views: 52810
Re: 256 colors in virtual terminal escape sequence
I have correct the problem of value out of range [0..255] this code show the problem in :toColotTable in part1: @echo off & setlocal enableDelayedExpansion mode 103,98 chcp 65001 cls for /F %%a in ('echo prompt $E^| cmd') do set "ESC=%%a" set hex[0]=BCBDADD0D1C1CFD0C0CECFBFD5D6C6D7D8C8D8D9C9DADBCBDB...