# Tag Info

## New answers tagged converting

0

Hmm, after some hard working I have made huge improvements to my code, I have significantly reduced the number of lines it spans and rewritten almost everything. It now uses bit shifts to handle the conversions, and it uses one line to convert the other four formats into decimal, and another line to convert decimal into the other four formats, with some ...

1

I don't have enough score to comment, so i'll write an answer instead: Its a interesting idea. I'm suprised there isn't any command that does this already? Function should always be verb-job. To get a list of approved verbs, do get-verb in the console. Might i suggest something hing like Invoke-BitConvert? when asking for one of several 'static' values ...

2

General comment Your code looks good to me from an coding-style point of view and is split into various small functions which is great. A pretty easy way to make it much better would be to add documentation: Comments for the different constants Docstrings for module and functions Let's see how various other details can be improved (in no specific order ...

3

I have made the code as simple as possible No you haven't, because you've arbitrarily decided to avoid a subset of built-ins. Any simplification advice I would give would be predicated on proper use of the standard library which is not the case here. Other points: Your NIBBLES and BYTES would be a good fit for namedtuple NIBBLES second element is redundant ...

1

Well, after numerous fixes and improvements, this is the final version of the script. I have tested it rigorously and made sure it is working properly. So here is the code: Function reg2ps1 { [CmdLetBinding()] Param( [Parameter(ValueFromPipeline = $true, Mandatory =$true)] [ValidateNotNullOrEmpty()] [Alias("FullName")] ...

Top 50 recent answers are included